\hypertarget{class_cloth}{
\section{Cloth Class Reference}
\label{class_cloth}\index{Cloth@{Cloth}}
}


the main cloth that that creates the internal mass and springs and manage them  




{\ttfamily \#include $<$Cloth.h$>$}



Collaboration diagram for Cloth:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=600pt]{class_cloth__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_cloth_a1838b44b8039e2f8050da10ef5594581}{Cloth} (const int \_\-height, const int \_\-width, const int \_\-verticalParticleCount, const int \_\-horizontalParticleCount, const float \_\-mass)
\begin{DoxyCompactList}\small\item\em ctor \end{DoxyCompactList}\item 
\hyperlink{class_cloth_a1530e0e5b2495e716092dba6a260da91}{$\sim$Cloth} ()
\begin{DoxyCompactList}\small\item\em dtor \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a7c4ea595a392cc6c6e46de523523bb8e}{updateParticles} (\hyperlink{class_obstacle_manager}{ObstacleManager} $\ast$\_\-obstacleManager)
\begin{DoxyCompactList}\small\item\em update the position of particles at each timestep interval \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ace9b404deea1db954a14c3c8e889bb02}{reInitialiseParticles} (const int \_\-height, const int \_\-width, const int \_\-verticalParticleCount, const int \_\-horizontalParticleCount, const float \_\-timestep, const \hyperlink{_cloth_8h_acfa28acdaa41352ffd89be690a20933d}{IntegrationType} \_\-integrationType, const \hyperlink{_cloth_8h_ae001644a85b583312feff94ad40e29af}{ConstrainedScenario} \_\-scenario)
\begin{DoxyCompactList}\small\item\em re initialise cloth to its default one with the current parameters and a specific scenario \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_aaeb6be5d4f79ac01778a6c835f0b9044}{reInitialiseParticles} (const int \_\-height, const int \_\-width, const int \_\-verticalParticleCount, const int \_\-horizontalParticleCount, const float \_\-timestep, const \hyperlink{_cloth_8h_acfa28acdaa41352ffd89be690a20933d}{IntegrationType} \_\-integrationType)
\begin{DoxyCompactList}\small\item\em re initialise cloth to its default one with the current parameters, keeping the current scenario \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ad8a4e79d3a5b6704ac0a9a2e1ad11b82}{loadGeometry} ()
\begin{DoxyCompactList}\small\item\em creates vbo for drawing \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ae4fa0f12a25c98cbde3be24b775c4dc7}{draw} (ngl::TransformStack \_\-txStack, \hyperlink{class_shader_manager}{ShaderManager} $\ast$io\_\-sman, const std::string \_\-wireframeShader, const std::string \_\-textureShader)
\begin{DoxyCompactList}\small\item\em draws the particles \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a2a8fb817f7946a0916dabae85859596a}{setEnableInternalTrace} (const bool \_\-state)
\begin{DoxyCompactList}\small\item\em sets whether internal trace is enabled \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a2e4e6284ea719634e35579c1e5dd2b8e}{getEnableInternalTrace} () const 
\begin{DoxyCompactList}\small\item\em returns whether internal tracing is enabled \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a606b9270b2b38e817a332a9e0db8943d}{setEnableInternalTraceNeighbours} (const bool \_\-state)
\begin{DoxyCompactList}\small\item\em sets whether internal trace with neighbours is enabled \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a621c9420f115e921de833b274113f63d}{getEnableInternalTraceNeighbours} () const 
\begin{DoxyCompactList}\small\item\em returns whether internal tracing with neighbours is enabled \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_add5b73a403b34cd15702192c9d74798e}{setInternalTraceParticleId} (const int \_\-val)
\begin{DoxyCompactList}\small\item\em sets the id of the particle under internal tracing \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a6f1531ec77fd22cdd15ffce0dc8d7cc9}{getInternalTraceParticleId} () const 
\begin{DoxyCompactList}\small\item\em returns the id of the particle that is currently being traced \end{DoxyCompactList}\item 
\hyperlink{class_particle}{Particle} $\ast$ \hyperlink{class_cloth_a775c037217b62163b09fc01e91793347}{getInternalTraceParticle} () const 
\begin{DoxyCompactList}\small\item\em returns the particle that is currently traced \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a46f4219c81133373ebd5a5da150858e2}{pinInternalTraceParticle} (const bool \_\-toBePinned)
\begin{DoxyCompactList}\small\item\em toggle pin detail for the current particle being traced \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a5a3271083f8c60c80a3044f95ec6ae0a}{setVerticalParticleCount} (const int \_\-count)
\begin{DoxyCompactList}\small\item\em sets the number of vertical particles \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a96669fd9095450709b2843d970a14c72}{getVerticalParticleCount} () const 
\begin{DoxyCompactList}\small\item\em returns the count of particle in the vertical direction \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a312055504c71ec2fd4e1ced3ddf898bc}{setHorizontalParticleCount} (const int \_\-count)
\begin{DoxyCompactList}\small\item\em sets the number of horizontal particles \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a50d241cd3aedf209480abdc1ffb34afe}{getHorizontalParticleCount} () const 
\begin{DoxyCompactList}\small\item\em returns the count of particle in the horizontal direction \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a8c128ccda5f7e028a474fd63b04203a3}{getEnableAutoCloth} () const 
\begin{DoxyCompactList}\small\item\em returns wherether automatic cloth movement is enabled \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a5c0e789a45edf72edb454da9a674b62c}{toggleEnableAutoCloth} ()
\begin{DoxyCompactList}\small\item\em toggles the state of the automatic cloth movement flag \end{DoxyCompactList}\item 
\hyperlink{_cloth_8h_acfa28acdaa41352ffd89be690a20933d}{IntegrationType} \hyperlink{class_cloth_a8b1296a9b6c7665de668c1da64e475f1}{getIntegrationType} () const 
\begin{DoxyCompactList}\small\item\em returns the integration algorithm for the simulation \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a2ad6e78c1c74e36483589d72cadee215}{setIntegrationType} (const \hyperlink{_cloth_8h_acfa28acdaa41352ffd89be690a20933d}{IntegrationType} \_\-type)
\begin{DoxyCompactList}\small\item\em sets the integration method used for the simulation update \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_acd03b4325b68237891eea91de9e9a2d8}{getDrawWireframe} ()
\begin{DoxyCompactList}\small\item\em returns the wireframe toggle value \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ac9c39c52a43332e62fa3d856650951b4}{setDrawWireframe} (const bool \_\-value)
\begin{DoxyCompactList}\small\item\em sets the flag for wireframe toggle for drawing \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ab12118f7a9b3c4189ba3de27c2f71b47}{setCurrentClothMaterial} (const std::string \_\-name)
\begin{DoxyCompactList}\small\item\em sets the material for the current cloth \end{DoxyCompactList}\item 
std::string \hyperlink{class_cloth_afb6cc65c406782be68dadf1bb991f29f}{getCurrentClothMaterialName} ()
\begin{DoxyCompactList}\small\item\em returns the current material name \end{DoxyCompactList}\item 
\hyperlink{class_cloth_material}{ClothMaterial} $\ast$ \hyperlink{class_cloth_a249ce32ebe9b92ef8fb2beb7c8f8bcce}{getCurrentClothMaterial} ()
\begin{DoxyCompactList}\small\item\em returns the current material object \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_acf607cf5cc2df100a742697726e83f62}{getCurrentClothMaterialIndex} ()
\begin{DoxyCompactList}\small\item\em returns the current material index \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a93b27ae83e8c857b441a4d4c5482caf7}{getStiffness} () const 
\begin{DoxyCompactList}\small\item\em returns the current stiffness of the simulation \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ab45e02358103313a23cc4a63b10ce2db}{setStiffness} (const float \_\-v)
\begin{DoxyCompactList}\small\item\em sets the stiffness for the cloth material \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_ae06b3255fd2b222712e02feb68d6aaa9}{getDamping} ()
\begin{DoxyCompactList}\small\item\em returns the current damping coefficient of the simulation \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a7a8cf6f20d72be953e3223a9424f6c76}{setDamping} (const float \_\-v)
\begin{DoxyCompactList}\small\item\em sets the damping for the cloth material \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a46d5fcadfe3fa3148061bf85082b5fd5}{setHeight} (const int \_\-v)
\begin{DoxyCompactList}\small\item\em sets the height of the cloth \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a256ace3111542ff6a2bf4b0b4a05ac57}{getHeight} ()
\begin{DoxyCompactList}\small\item\em returns the height of the cloth \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a92cb09d7554e38437b52514d98260a40}{setWidth} (const int \_\-v)
\begin{DoxyCompactList}\small\item\em sets the width of the cloth \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a018ba2e44f3ab825d29eb0e009d0709c}{getWidth} ()
\begin{DoxyCompactList}\small\item\em returns the width of the cloth \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a5a6b49a964b91b580872a8a0ae421eb4}{setTimestep} (const float \_\-v)
\begin{DoxyCompactList}\small\item\em sets the timestep of the cloth simulation \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_ad1a280ad0b6d38a3db36510cf16fd688}{getTimestep} ()
\begin{DoxyCompactList}\small\item\em returns the timestep of the simulation \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a606669ddb6a5ebf7e1d7219b27d1f6d3}{setEnableGravity} (const bool \_\-v)
\begin{DoxyCompactList}\small\item\em sets the toggle for gravity force \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a838c5a4dd71c46612ee953c46463ccfa}{getEnableGravity} ()
\begin{DoxyCompactList}\small\item\em returns the toggle value for gravity \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a4b9384b741ca861a37a1c945037facab}{setEnableWind} (const bool \_\-v)
\begin{DoxyCompactList}\small\item\em sets the toggle for wind force \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a1f193ecc812a71cbb799de6c7df302b0}{getEnableWind} ()
\begin{DoxyCompactList}\small\item\em returns the toggle value for wind \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a485ba5d8ff190b3b6796b2c214827083}{getWindStrength} ()
\begin{DoxyCompactList}\small\item\em returns the wind strength \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a651a9547682278457282e810af5e5c74}{setWindStrength} (const float \_\-v)
\begin{DoxyCompactList}\small\item\em sets the wind strength \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_cloth_a7611f0720052545604a01edd24bdf0b1}{getWindDirection} ()
\begin{DoxyCompactList}\small\item\em returns the wind direction \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a32d856e47b5fe3c989ba0eb7d320688e}{setWindDirection} (const ngl::Vector \_\-v)
\begin{DoxyCompactList}\small\item\em sets the wind direction \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_acf80d4429b37754492852ea912d90061}{setEnableHookeStructural} (const bool \_\-v)
\begin{DoxyCompactList}\small\item\em sets the toggle for structural spring of the simulation \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_abc31a3b10698c87c85b91f4314a0ace4}{getEnableHookeStructural} ()
\begin{DoxyCompactList}\small\item\em returns the toggle value for structural spring of the simulation \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a2e3d9169d09c47244dbefb39ac96a040}{setEnableHookeStretch} (const bool \_\-v)
\begin{DoxyCompactList}\small\item\em sets the toggle for stretch spring of the simulation \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_ad55f393d76ad6f83c794005a2131ab40}{getEnableHookeStretch} ()
\begin{DoxyCompactList}\small\item\em returns the toggle for the stretch spring of the simulation \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ad07056b0caddff0e5832780868d3fe1f}{setEnableHookeBend} (const bool \_\-v)
\begin{DoxyCompactList}\small\item\em sets the toggle for bend spring of the simulation \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a2f23ed8fead11334f05639d19052e403}{getEnableHookeBend} ()
\begin{DoxyCompactList}\small\item\em returns the toggle for bend spring of the simulation \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a2d1e49eb2f459c1ec6df8e5ff412d720}{pinAll} (const bool \_\-toBePinned)
\begin{DoxyCompactList}\small\item\em toggle the pin value for all the particles \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a0a0b122e8318de0c3081b91b77fb649d}{pinRow} (const bool \_\-toBePinned)
\begin{DoxyCompactList}\small\item\em toggle the pin value for a row \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a79b2f7ba3cede040bc489cba434c5676}{pinColumn} (const bool \_\-toBePinned)
\begin{DoxyCompactList}\small\item\em toggle the pin value for a column \end{DoxyCompactList}\item 
\hyperlink{_cloth_8h_ae001644a85b583312feff94ad40e29af}{ConstrainedScenario} \hyperlink{class_cloth_a2af13e028425bfe1f4322eaf8166cb46}{getScenario} ()
\begin{DoxyCompactList}\small\item\em returns the current scenario of the simulation \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_cloth_af69c4b6f2c8a1b2524068d1e9e4f92b5}{deleteParticles} ()
\begin{DoxyCompactList}\small\item\em delete particles structural horizontal rest length \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_acca44e18ce4e7da4348e0a1051f8971c}{initialStaticConstraints} ()
\begin{DoxyCompactList}\small\item\em setup static constraints and pinning based on current scenarios \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ac486df7a67635b32d05e4109d83edd4d}{createAndConnectParticles} ()
\begin{DoxyCompactList}\small\item\em creates, connect and position particles \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_abe59f6418666b9a4ce7e5ed593073331}{createParticles} ()
\begin{DoxyCompactList}\small\item\em create particles \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a27d2f7d8d45c4e490bf7f44570061097}{positionParticles} (const bool \_\-isHorizontal=true)
\begin{DoxyCompactList}\small\item\em position particles in space \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a3265dd5329597834844b20b77e27fe64}{connectParticles} ()
\begin{DoxyCompactList}\small\item\em connect particles through springs \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_aa79c3d12a42cea0b379fbc0f477bcd77}{refreshParticleNeighbours} ()
\begin{DoxyCompactList}\small\item\em refresh and update the neighbours of particles \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a53bce85da93eba6928cc17046e06f8bd}{evaluateNetForces} ()
\begin{DoxyCompactList}\small\item\em evaluate net force on the particles \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a82cb5da97073e44dd98d56662c66cd0e}{evaluateEularExplicit} (\hyperlink{class_particle}{Particle} $\ast$io\_\-currentParticle)
\begin{DoxyCompactList}\small\item\em integrate a particle using eular explicit \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a4c2efc854ad5bed4013cad829fa55b6f}{evaluateVerlet} (\hyperlink{class_particle}{Particle} $\ast$io\_\-currentParticle)
\begin{DoxyCompactList}\small\item\em integrate a particle using verlet \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a9fda4288162377adeaedd272d6d2d908}{integrateNext} (\hyperlink{class_particle}{Particle} $\ast$io\_\-currentParticle)
\begin{DoxyCompactList}\small\item\em integrate next velocity and position of a particle \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a39c6542de6123d1f999ec703db92e85f}{integrateBackward} (\hyperlink{class_particle}{Particle} $\ast$io\_\-currentParticle, const ngl::Vector \_\-newPosition)
\begin{DoxyCompactList}\small\item\em integrate backward when collsion occurs to maintain continuity in velocity and position \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a5eb1fef194490874f2f518a92e65031d}{isCollisionDetected} (\hyperlink{class_obstacle_manager}{ObstacleManager} $\ast$\_\-obstacleManager, \hyperlink{class_particle}{Particle} $\ast$\_\-currentParticle, ngl::Vector \&o\_\-newPosition)
\begin{DoxyCompactList}\small\item\em check if collision occured by a particle \end{DoxyCompactList}\item 
ngl::Colour \hyperlink{class_cloth_ab273d82cd73bb5bb76adfc06c4ee2d0d}{determineParticleColor} (const \hyperlink{class_particle}{Particle} $\ast$\_\-particle)
\begin{DoxyCompactList}\small\item\em determine the colour to be applied to a particle \end{DoxyCompactList}\item 
ngl::Colour \hyperlink{class_cloth_a79b3e844ec62c2f6112a473ab86ca8c3}{determineIfIsANeighbourAndGetColour} (const int \_\-mainId, const int \_\-testId)
\begin{DoxyCompactList}\small\item\em check if a particle is a neighbour of a center particle under consideration and returns a specific colour based on the type of spring \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a17c1c5a992c7a042294af35baab20c53}{createGlobalSpring} (const int \_\-mainId, const int \_\-neighbourId, const float \_\-length, const \hyperlink{_spring_8h_ae5df13207e05e6661ba0e16d18d1f83e}{SpringType} \_\-springType)
\begin{DoxyCompactList}\small\item\em connect a specific spring between 2 particles for hookes law calculations \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a24334b6d6cefc4e1baa8452e7cc8fb12}{createAndAddSpringToParticle} (const int \_\-mainId, const int \_\-neighbourId)
\begin{DoxyCompactList}\small\item\em connect springs between 2 particles \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a47be21da0ba13f706fd38d1051823ea1}{getIdFromCoordinates} (const int \_\-z, const int \_\-x)
\begin{DoxyCompactList}\small\item\em returns an id from z,x coordinates \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a08163378d5d4aec1f13f6fb6dccfd40f}{getZXCoordinatesFromId} (const int \_\-id, int \&o\_\-z, int \&o\_\-x)
\begin{DoxyCompactList}\small\item\em get z,x coordinates given an id \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a9c255e372971e0a67659a9e4c5a2d770}{determineInternalSpringForce} (\hyperlink{class_spring}{Spring} $\ast$o\_\-spring)
\begin{DoxyCompactList}\small\item\em determine spring force in a spring \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a7a2d1d8eb99c15051317ce9bfb9cbf23}{setupQuadsForSolidDrawing} ()
\begin{DoxyCompactList}\small\item\em setup the particles in quads for drawing later on \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_cloth_a47aac63f5418bad0d30c4e54dda2a135}{calculateTriangleNormal} (\hyperlink{class_particle}{Particle} $\ast$\_\-p1, \hyperlink{class_particle}{Particle} $\ast$\_\-p2, \hyperlink{class_particle}{Particle} $\ast$\_\-p3)
\begin{DoxyCompactList}\small\item\em calculates a triangle normal \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ae8f8aa108f3ccee965bbb7fc02bff86f}{addWindForceOnTriangle} (\hyperlink{class_particle}{Particle} $\ast$io\_\-p1, \hyperlink{class_particle}{Particle} $\ast$io\_\-p2, \hyperlink{class_particle}{Particle} $\ast$io\_\-p3, const ngl::Vector \_\-direction)
\begin{DoxyCompactList}\small\item\em calculates wind on a triangle and add the force to the particles \end{DoxyCompactList}\item 
unsigned char $\ast$ \hyperlink{class_cloth_a8bafb7e0921b70dee4ae6e7a75562748}{loadimgdata} (const std::string \_\-filename)
\begin{DoxyCompactList}\small\item\em reads an image file and return data \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ac75b4a4e7bebcbb1e4e3305ff59c6e32}{createTextures} ()
\begin{DoxyCompactList}\small\item\em create textures, loading them from file \end{DoxyCompactList}\item 
\hyperlink{class_cloth_material}{ClothMaterial} $\ast$ \hyperlink{class_cloth_a7c49d2bed665097229ad5e1394b76d4a}{getDefaultClothMaterial} ()
\begin{DoxyCompactList}\small\item\em returns the default cloth material object \end{DoxyCompactList}\item 
\hyperlink{class_cloth_material}{ClothMaterial} $\ast$ \hyperlink{class_cloth_a22c40ebcfd07d49657e82150bdada604}{getClothMaterialByName} (const std::string \_\-name, int \&o\_\-index, float \&o\_\-stiffness, float \&o\_\-damping)
\begin{DoxyCompactList}\small\item\em returns a cloth material object and its index, given a name \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_ad174665ffd8d7033d163d6b2dff2388e}{initialise} (const int \_\-height, const int \_\-width, const int \_\-verticalParticleCount, const int \_\-horizontalParticleCount, const float \_\-timestep, const \hyperlink{_cloth_8h_acfa28acdaa41352ffd89be690a20933d}{IntegrationType} \_\-integrationType)
\begin{DoxyCompactList}\small\item\em initialise cloth parameters \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_a0771263f8ade2d40fd15668223c2d873}{pinRow} (const bool \_\-toBePinned, const int \_\-row)
\begin{DoxyCompactList}\small\item\em pin a specific row \end{DoxyCompactList}\item 
void \hyperlink{class_cloth_af5c6cdf8ec2507786972cfc88463dcf4}{pinColumn} (const bool \_\-toBePinned, const int \_\-column)
\begin{DoxyCompactList}\small\item\em pin a specific column \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
std::vector$<$ \hyperlink{class_particle}{Particle} $\ast$ $>$ $\ast$ \hyperlink{class_cloth_a54d9b579bfc313d90015cbc1a7a17547}{m\_\-particleList}
\begin{DoxyCompactList}\small\item\em the masses affecting the cloth simulation \end{DoxyCompactList}\item 
std::vector$<$ \hyperlink{class_particle}{Particle} $\ast$ $>$ $\ast$ \hyperlink{class_cloth_aa13afb99925b71b856e1c080354430bd}{m\_\-particleInQuadList}
\begin{DoxyCompactList}\small\item\em the particles arranged in quad \end{DoxyCompactList}\item 
std::vector$<$ \hyperlink{class_spring}{Spring} $\ast$ $>$ $\ast$ \hyperlink{class_cloth_af449ac46fd5165eeeca9ac833f3c92e8}{m\_\-springList}
\begin{DoxyCompactList}\small\item\em the springs connecting the masses \end{DoxyCompactList}\item 
std::vector$<$ ngl::Vector $>$ \hyperlink{class_cloth_aa0ed767b913eaa0679a4c95771b462aa}{m\_\-particlePositionList}
\begin{DoxyCompactList}\small\item\em the positions of the masses used in the vertex array for drawing \end{DoxyCompactList}\item 
std::vector$<$ ngl::Vector $>$ \hyperlink{class_cloth_a8f6d155a0c94ca220f32bb87a1d6401f}{m\_\-particleQuadPositionList}
\begin{DoxyCompactList}\small\item\em the positions of quads of masses used in the vertex array for drawing \end{DoxyCompactList}\item 
std::vector$<$ GLfloat $>$ \hyperlink{class_cloth_ac50992dd4b3623d32105f2db08ac0653}{m\_\-textureCoords}
\begin{DoxyCompactList}\small\item\em the texture coordinates of quads used in shaded mode drawing \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_aa4c363e31d209cfb19a380a6082f7979}{m\_\-initialClothHeight}
\begin{DoxyCompactList}\small\item\em the initial height of the cloth \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a39cdd63d4c34d20d1dd20af93db39ae2}{m\_\-drawWireframe}
\begin{DoxyCompactList}\small\item\em flag to toggle wireframe mode \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a6a75663870131f8fab352635d8d3bdf7}{m\_\-height}
\begin{DoxyCompactList}\small\item\em the height of cloth \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a5f4d2021d57ed2e0878ac5a33ed1dbc6}{m\_\-width}
\begin{DoxyCompactList}\small\item\em the width of cloth \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a5ff153c4675f7ecee9332fb6a7cb539c}{m\_\-verticalParticleCount}
\begin{DoxyCompactList}\small\item\em the vertical number of particles in the cloth \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a3e922c699471d4a3bd91341b3595c82d}{m\_\-horizontalParticleCount}
\begin{DoxyCompactList}\small\item\em the horizontal number of particles in the cloth \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a3987b2432a7ab759620ed1b819108ce1}{m\_\-xStep}
\begin{DoxyCompactList}\small\item\em the step value in the column horizontal direction \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_aec3675b89e39e40e5fedf4f5d107c1ca}{m\_\-zStep}
\begin{DoxyCompactList}\small\item\em the step value in the row vertical direction \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a99be52bcaefb13a24d24a38d82e65374}{m\_\-particleMass}
\begin{DoxyCompactList}\small\item\em the particle mass \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a46ae54815dd32d088659001975cbbfdf}{m\_\-particleRadius}
\begin{DoxyCompactList}\small\item\em the particle radius \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_af6c5609126be8dc3955cca34d5f6ba68}{m\_\-timestep}
\begin{DoxyCompactList}\small\item\em the timestep of the simulation \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a5ed69fb018e414f71f936ffc601ba185}{m\_\-stiffness}
\begin{DoxyCompactList}\small\item\em the stiffness of the cloth \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a3e1811ffca75b2125835866d59afa85e}{m\_\-damping}
\begin{DoxyCompactList}\small\item\em the damping coefficient of the cloth \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a95ed2b74380bface428a4f8681414a33}{m\_\-enableGravity}
\begin{DoxyCompactList}\small\item\em the toggle for gravity \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_af4954e5f36b3c305146c683858faad16}{m\_\-windEnabled}
\begin{DoxyCompactList}\small\item\em the toggle for wind \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a6c579587fc6dcac3fa2f05de004209e9}{m\_\-windStrength}
\begin{DoxyCompactList}\small\item\em the wind strength \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_cloth_a07c296175e790cc2745397a20050a22a}{m\_\-windDirection}
\begin{DoxyCompactList}\small\item\em the wind direction \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a1cf9b55203f28d36734a3aefba2c4943}{m\_\-enableHookeStructural}
\begin{DoxyCompactList}\small\item\em the toggle for structural springs \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_ac8d8cf28c6eaca9cae14945d7d409937}{m\_\-enableHookeStretch}
\begin{DoxyCompactList}\small\item\em the toggle for stretch springs \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a40f31567cce250c0dcc4fa6794a71677}{m\_\-enableHookeBend}
\begin{DoxyCompactList}\small\item\em the toggle for bend springs \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_afb8dac26ecdc205d6f6ad98e1acc0dee}{m\_\-maxLastRowWeight}
\begin{DoxyCompactList}\small\item\em the maximum weight of the last row \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_aa83f509239244eed1f5bef0d81387f57}{m\_\-weightSteps}
\begin{DoxyCompactList}\small\item\em the number of steps to apply weighted cloth \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a15277d242052d2bfb13d65216d58cc6b}{m\_\-enableInternalTrace}
\begin{DoxyCompactList}\small\item\em flag to determine if we are tracing a particle \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a889f1bb60655e0ac5ecdb9cf7ddb585b}{m\_\-internalTraceParticleId}
\begin{DoxyCompactList}\small\item\em the id of the particle that is being traced \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_aebb3c928f10ca1b42909b40619a8230e}{m\_\-enableInternalTraceNeighbours}
\begin{DoxyCompactList}\small\item\em flag to determine if we are tracing neighbours \end{DoxyCompactList}\item 
bool \hyperlink{class_cloth_a47edaa2a2106931fafa44a239b0e2e9f}{m\_\-enableAutoCloth}
\begin{DoxyCompactList}\small\item\em flag to control automatic movement of the cloth \end{DoxyCompactList}\item 
\hyperlink{_cloth_8h_acfa28acdaa41352ffd89be690a20933d}{IntegrationType} \hyperlink{class_cloth_a2046a162c4295d42cbd682c8610c706b}{m\_\-integrationType}
\begin{DoxyCompactList}\small\item\em integration method used for the simulation \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a5f1213368180a05a2d0b8cf7d4888c9c}{m\_\-structuralHorizontalRestLength}
\begin{DoxyCompactList}\small\item\em the structural horizontal rest length \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_a153e9ce0701eba72013c1b32f63c207e}{m\_\-structuralVerticalRestLength}
\begin{DoxyCompactList}\small\item\em the structural vertical rest length \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_aff62df0ea5a75f95d2a51d5f4b1bd486}{m\_\-shearRestLength}
\begin{DoxyCompactList}\small\item\em the shear rest length \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_abc421c5bf4ec48f390924b263e2dfc5d}{m\_\-flexHorizontalRestLength}
\begin{DoxyCompactList}\small\item\em the bend horizontal rest length \end{DoxyCompactList}\item 
float \hyperlink{class_cloth_aed5eeefed9d85268b05acea871f6a639}{m\_\-flexVerticalRestLength}
\begin{DoxyCompactList}\small\item\em the bend horizontal rest length \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_af1ec513edf4ac7da95730029fb66c01b}{m\_\-textureCount}
\begin{DoxyCompactList}\small\item\em the number of textures loaded \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a9ca17695de5153de7abd8f28d71573ba}{m\_\-textureWidth}
\begin{DoxyCompactList}\small\item\em the texture width \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a1d54155c182a781ce2597c4b1dd18dfb}{m\_\-textureHeight}
\begin{DoxyCompactList}\small\item\em the texture height \end{DoxyCompactList}\item 
std::vector$<$ GLuint $>$ \hyperlink{class_cloth_a68232ee25e97b627d0cdfc4c9c182e1b}{m\_\-textureHandler}
\begin{DoxyCompactList}\small\item\em the texture handlers \end{DoxyCompactList}\item 
std::vector$<$ \hyperlink{class_cloth_material}{ClothMaterial} $\ast$ $>$ $\ast$ \hyperlink{class_cloth_add2a30526aa0d960777b2c703e045bbe}{m\_\-clothMaterialList}
\begin{DoxyCompactList}\small\item\em the list of cloth materials \end{DoxyCompactList}\item 
\hyperlink{class_cloth_material}{ClothMaterial} $\ast$ \hyperlink{class_cloth_a1451431eb37bf4b9a2c9b9a3ef23eea5}{m\_\-currentClothMaterial}
\begin{DoxyCompactList}\small\item\em the currently selected cloth material \end{DoxyCompactList}\item 
int \hyperlink{class_cloth_a753699ec667bf4160828303e178b7bf4}{m\_\-currentClothMaterialIndex}
\begin{DoxyCompactList}\small\item\em the index of the currently selected cloth material \end{DoxyCompactList}\item 
\hyperlink{_cloth_8h_ae001644a85b583312feff94ad40e29af}{ConstrainedScenario} \hyperlink{class_cloth_a9db55964f628a0c4b3cb44b8912f52dd}{m\_\-scenario}
\begin{DoxyCompactList}\small\item\em the scenario of the simulation \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
the main cloth that that creates the internal mass and springs and manage them 

Definition at line 46 of file Cloth.h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_cloth_a1838b44b8039e2f8050da10ef5594581}{
\index{Cloth@{Cloth}!Cloth@{Cloth}}
\index{Cloth@{Cloth}!Cloth@{Cloth}}
\subsubsection[{Cloth}]{\setlength{\rightskip}{0pt plus 5cm}Cloth::Cloth (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-height, }
\item[{const int}]{\_\-width, }
\item[{const int}]{\_\-verticalParticleCount, }
\item[{const int}]{\_\-horizontalParticleCount, }
\item[{const float}]{\_\-mass}
\end{DoxyParamCaption}
)}}
\label{class_cloth_a1838b44b8039e2f8050da10ef5594581}


ctor 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-height} & height/depth of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-width} & width of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-verticalParticleCount} & the number of particles in the vertical direction of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-horizontalParticleCount} & the number of particles in the horizontal direction of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-mass} & the mass of the particles \\
\hline
\end{DoxyParams}


Definition at line 14 of file Cloth.cpp.



References EULAR\_\-FORWARD, Configuration::initialiseClothMaterials(), and TABLECLOTH.


\begin{DoxyCode}
{
    //set scenario
    m_scenario = TABLECLOTH;

    //init params
    m_drawWireframe = true;

    //init weighted cloth params
    m_maxLastRowWeight = 5;
    m_weightSteps = 0;

    //init particles params
    m_particleMass = _mass;
    initialise(_height, _width, _verticalParticleCount, _horizontalParticleCount,
       0.007, EULAR_FORWARD);

    //read cloth materials from configuration (texture, stiffness, damping)
    m_clothMaterialList = Configuration::initialiseClothMaterials();
    m_currentClothMaterial = getDefaultClothMaterial();

    //init textures
    m_textureCount = m_clothMaterialList->size();
    m_textureWidth = 0;
    m_textureHeight = 0;
    for (int i = 0; i < m_textureCount; i++) m_textureHandler.push_back(0);

    //init forces
    m_enableGravity = true;
    m_enableHookeBend = false;
    m_enableHookeStretch = true;
    m_enableHookeStructural = true;

    //trace particles params
    m_enableInternalTrace = true;
    m_internalTraceParticleId = 0;
    m_enableInternalTraceNeighbours = true;

    //automatic update init
    m_enableAutoCloth = false;

    //init wind params
    m_windEnabled = false;
    m_windStrength = 0.005;
    m_windDirection.set(0, 0, 0);

    //init particle size
    m_particleRadius = 4.0;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=360pt]{class_cloth_a1838b44b8039e2f8050da10ef5594581_cgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a1530e0e5b2495e716092dba6a260da91}{
\index{Cloth@{Cloth}!$\sim$Cloth@{$\sim$Cloth}}
\index{$\sim$Cloth@{$\sim$Cloth}!Cloth@{Cloth}}
\subsubsection[{$\sim$Cloth}]{\setlength{\rightskip}{0pt plus 5cm}Cloth::$\sim$Cloth (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_cloth_a1530e0e5b2495e716092dba6a260da91}


dtor 



Definition at line 69 of file Cloth.cpp.



References deleteParticles(), and m\_\-clothMaterialList.


\begin{DoxyCode}
{
    //clean up
    std::cout << "Cloth Cleanup" << std::endl;

    //delete all particle objects in the list and clear the list
    deleteParticles();

    //delete cloth materials
    for (int i = 0; i < m_clothMaterialList->size(); i++) delete (*
      m_clothMaterialList)[i];
    delete m_clothMaterialList;

    std::cout << "Cloth deleted\n" << std::endl;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=300pt]{class_cloth_a1530e0e5b2495e716092dba6a260da91_cgraph}
\end{center}
\end{figure}




\subsection{Member Function Documentation}
\hypertarget{class_cloth_ae8f8aa108f3ccee965bbb7fc02bff86f}{
\index{Cloth@{Cloth}!addWindForceOnTriangle@{addWindForceOnTriangle}}
\index{addWindForceOnTriangle@{addWindForceOnTriangle}!Cloth@{Cloth}}
\subsubsection[{addWindForceOnTriangle}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::addWindForceOnTriangle (
\begin{DoxyParamCaption}
\item[{{\bf Particle} $\ast$}]{io\_\-p1, }
\item[{{\bf Particle} $\ast$}]{io\_\-p2, }
\item[{{\bf Particle} $\ast$}]{io\_\-p3, }
\item[{const ngl::Vector}]{\_\-direction}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_ae8f8aa108f3ccee965bbb7fc02bff86f}


calculates wind on a triangle and add the force to the particles 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-p1} & point 1 of the triangle \\
\hline
\mbox{\tt in,out}  & {\em io\_\-p2} & point 2 of the triangle \\
\hline
\mbox{\tt in,out}  & {\em io\_\-p3} & point 3 of the triangle \\
\hline
\mbox{\tt in}  & {\em \_\-direction} & the direction of th ewind \\
\hline
\end{DoxyParams}


Definition at line 782 of file Cloth.cpp.



References Particle::addToNetForce().


\begin{DoxyCode}
{
    //calculate normal of triangle
    ngl::Vector normal = calculateTriangleNormal(p1, p2, p3);
    normal.normalize();

    //calculate force of wind in direction of the triangle normal
    ngl::Vector d = _direction;

    ngl::Vector force(0, 0, 0);
    if (d.length() == 0)
    {
        //no wind
    }
    else
    {
        d.normalize();
        force = m_windStrength * normal * normal.dot(d);
    }

    //add wind force to 3 points of the triangle
    p1->addToNetForce(force);
    p2->addToNetForce(force);
    p3->addToNetForce(force);
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=394pt]{class_cloth_ae8f8aa108f3ccee965bbb7fc02bff86f_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ae8f8aa108f3ccee965bbb7fc02bff86f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a47aac63f5418bad0d30c4e54dda2a135}{
\index{Cloth@{Cloth}!calculateTriangleNormal@{calculateTriangleNormal}}
\index{calculateTriangleNormal@{calculateTriangleNormal}!Cloth@{Cloth}}
\subsubsection[{calculateTriangleNormal}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Cloth::calculateTriangleNormal (
\begin{DoxyParamCaption}
\item[{{\bf Particle} $\ast$}]{\_\-p1, }
\item[{{\bf Particle} $\ast$}]{\_\-p2, }
\item[{{\bf Particle} $\ast$}]{\_\-p3}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a47aac63f5418bad0d30c4e54dda2a135}


calculates a triangle normal 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-p1} & point 1 of the triangle \\
\hline
\mbox{\tt in}  & {\em \_\-p2} & point 2 of the triangle \\
\hline
\mbox{\tt in}  & {\em \_\-p3} & point 3 of the triangle \\
\hline
\end{DoxyParams}


Definition at line 814 of file Cloth.cpp.



References Particle::getPosition().


\begin{DoxyCode}
{
    ngl::Vector A = p1->getPosition() - p2->getPosition();
    ngl::Vector B = p3->getPosition() - p2->getPosition();

    return A.cross(B);
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=370pt]{class_cloth_a47aac63f5418bad0d30c4e54dda2a135_cgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a3265dd5329597834844b20b77e27fe64}{
\index{Cloth@{Cloth}!connectParticles@{connectParticles}}
\index{connectParticles@{connectParticles}!Cloth@{Cloth}}
\subsubsection[{connectParticles}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::connectParticles (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a3265dd5329597834844b20b77e27fe64}


connect particles through springs 



Definition at line 321 of file Cloth.cpp.



References createGlobalSpring(), FLEX\_\-SPRING, getIdFromCoordinates(), m\_\-flexHorizontalRestLength, m\_\-flexVerticalRestLength, m\_\-horizontalParticleCount, m\_\-shearRestLength, m\_\-structuralHorizontalRestLength, m\_\-structuralVerticalRestLength, m\_\-verticalParticleCount, m\_\-xStep, m\_\-zStep, refreshParticleNeighbours(), SHEAR\_\-SPRING, and STRUCTURAL\_\-SPRING.


\begin{DoxyCode}
{
    //calculate rest lengths
    m_structuralHorizontalRestLength = m_xStep;
    m_structuralVerticalRestLength = m_zStep;
    m_shearRestLength = sqrt((m_xStep * m_xStep) + (m_zStep * m_zStep));
    m_flexHorizontalRestLength = m_xStep * 2;
    m_flexVerticalRestLength = m_zStep * 2;

    //create springs to connect particles with their neighbours for structural, s
      hear and flexion
    for (int z = 0; z < m_verticalParticleCount; z++)
    {
        for (int x = 0; x < m_horizontalParticleCount; x++)
        {
            //determine id of current particle
            int mainId = getIdFromCoordinates(z, x);

            //evaluate vertical structural force
            if (z < m_verticalParticleCount - 1)
            {
                //get node to the bottom of it
                int neighbourId = mainId + m_horizontalParticleCount;

                //create spring
                createGlobalSpring(mainId, neighbourId, 
      m_structuralVerticalRestLength, STRUCTURAL_SPRING);
            }

            //evaluate horizontal structural force
            if (x < m_horizontalParticleCount - 1)
            {
                //get node to the right of it
                int neighbourId = mainId + 1;

                //create spring
                createGlobalSpring(mainId, neighbourId, 
      m_structuralHorizontalRestLength, STRUCTURAL_SPRING);
            }

            //evaluate top-right shear force
            if ((z > 0) && (x < m_horizontalParticleCount - 1))
            {
                //get node to the top-right of it
                int neighbourId = getIdFromCoordinates(z - 1, x + 1);

                //create spring
                createGlobalSpring(mainId, neighbourId, m_shearRestLength, 
      SHEAR_SPRING);
            }

            //evaluate bottom-right shear force
            if ((z < m_verticalParticleCount - 1) && (x < m_horizontalParticleCou
      nt - 1))
            {
                //get node to the bottom-right of it
                int neighbourId = getIdFromCoordinates(z + 1, x + 1);

                //create spring
                createGlobalSpring(mainId, neighbourId, m_shearRestLength, 
      SHEAR_SPRING);
            }

            //evaluate vertical flex force
            if (z < m_verticalParticleCount - 2)
            {
                //get node to the bottom of it
                int neighbourId = mainId + (m_horizontalParticleCount * 2);

                //create spring
                createGlobalSpring(mainId, neighbourId, m_flexVerticalRestLength,
       FLEX_SPRING);
            }

            //evaluate horizontal structural force
            if (x < m_horizontalParticleCount - 2)
            {
                //get node to the right of it
                int neighbourId = mainId + 2;

                //create spring
                createGlobalSpring(mainId, neighbourId, 
      m_flexHorizontalRestLength, FLEX_SPRING);
            }
        }
    }

    //refresh the neighbour list of each particles for quicker access to their ne
      ighbours
    //without having to search through the global neighbour list again
    refreshParticleNeighbours();
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a3265dd5329597834844b20b77e27fe64_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=398pt]{class_cloth_a3265dd5329597834844b20b77e27fe64_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a24334b6d6cefc4e1baa8452e7cc8fb12}{
\index{Cloth@{Cloth}!createAndAddSpringToParticle@{createAndAddSpringToParticle}}
\index{createAndAddSpringToParticle@{createAndAddSpringToParticle}!Cloth@{Cloth}}
\subsubsection[{createAndAddSpringToParticle}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::createAndAddSpringToParticle (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-mainId, }
\item[{const int}]{\_\-neighbourId}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a24334b6d6cefc4e1baa8452e7cc8fb12}


connect springs between 2 particles 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-mainId} & the main particle \\
\hline
\mbox{\tt in}  & {\em \_\-neighbourId} & the neighbouring particle \\
\hline
\end{DoxyParams}
\hypertarget{class_cloth_ac486df7a67635b32d05e4109d83edd4d}{
\index{Cloth@{Cloth}!createAndConnectParticles@{createAndConnectParticles}}
\index{createAndConnectParticles@{createAndConnectParticles}!Cloth@{Cloth}}
\subsubsection[{createAndConnectParticles}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::createAndConnectParticles (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_ac486df7a67635b32d05e4109d83edd4d}


creates, connect and position particles 



Definition at line 161 of file Cloth.cpp.



References BANNER, connectParticles(), createParticles(), FLAG, initialStaticConstraints(), m\_\-scenario, and positionParticles().


\begin{DoxyCode}
{
    //create particles
    createParticles();

    //position particles - initial orientation depends on scenario
    if (m_scenario == FLAG || m_scenario == BANNER)
        positionParticles(false);
    else
        //curtain, tablecloth and shelter -> horizontal
        positionParticles();

    //connect particles together-> create springs
    connectParticles();

    //init default pinnings
    initialStaticConstraints();
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ac486df7a67635b32d05e4109d83edd4d_cgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a17c1c5a992c7a042294af35baab20c53}{
\index{Cloth@{Cloth}!createGlobalSpring@{createGlobalSpring}}
\index{createGlobalSpring@{createGlobalSpring}!Cloth@{Cloth}}
\subsubsection[{createGlobalSpring}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::createGlobalSpring (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-mainId, }
\item[{const int}]{\_\-neighbourId, }
\item[{const float}]{\_\-length, }
\item[{const {\bf SpringType}}]{\_\-springType}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a17c1c5a992c7a042294af35baab20c53}


connect a specific spring between 2 particles for hookes law calculations 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-mainId} & the main particle \\
\hline
\mbox{\tt in}  & {\em \_\-neighbourId} & the neighbouring particle \\
\hline
\mbox{\tt in}  & {\em \_\-length} & the rest length of the spring \\
\hline
\mbox{\tt in}  & {\em \_\-springType} & the type of the spring \\
\hline
\end{DoxyParams}


Definition at line 406 of file Cloth.cpp.


\begin{DoxyCode}
{
    //get main particle object
    Particle* mainParticle = (*m_particleList)[_mainId];

    //get neighbouring particle
    Particle* neighbourParticle = (*m_particleList)[_neighbourId];

    //create a new spring to connect the 2 particles
    Spring* spring = new Spring(mainParticle, neighbourParticle, _length, _spring
      Type);

    //add the new spring to the global spring list
    m_springList->push_back(spring);
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a17c1c5a992c7a042294af35baab20c53_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_abe59f6418666b9a4ce7e5ed593073331}{
\index{Cloth@{Cloth}!createParticles@{createParticles}}
\index{createParticles@{createParticles}!Cloth@{Cloth}}
\subsubsection[{createParticles}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::createParticles (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_abe59f6418666b9a4ce7e5ed593073331}


create particles 



Definition at line 180 of file Cloth.cpp.



References getIdFromCoordinates(), Particle::getMass(), m\_\-horizontalParticleCount, m\_\-maxLastRowWeight, m\_\-particleInQuadList, m\_\-particleList, m\_\-particleMass, m\_\-particlePositionList, m\_\-particleQuadPositionList, m\_\-springList, m\_\-textureCoords, m\_\-verticalParticleCount, m\_\-weightSteps, Configuration::s\_\-debug, Particle::setMass(), and setupQuadsForSolidDrawing().


\begin{DoxyCode}
{
    //initialise particle list
    m_particleList = new std::vector<Particle*>;

    //initialise spring list
    m_springList = new std::vector<Spring*>;

    //initialise particle quad list
    m_particleQuadPositionList.clear();
    m_particleInQuadList = new std::vector<Particle*>;
    m_textureCoords.clear();

    //initialise particle position list
    m_particlePositionList.clear();

    for (int z = 0; z < m_verticalParticleCount; z++)
    {
        for (int x = 0; x < m_horizontalParticleCount; x++)
        {
            //determine id of next particle to create
            int id = getIdFromCoordinates(z, x);

            //create a particle
            Particle* p = new Particle(id, m_particleMass);

            //add particle to list of particles
            m_particleList->push_back(p);

            //add an empty placeholder to the position list
            m_particlePositionList.push_back(ngl::Vector(0, 0, 0));

            if (Configuration::s_debug) std::cout << "Cloth Particle created with
       id = " << id << std::endl;
        }
    }

    //setup quad list for drawing solid shaded and wind calculation
    setupQuadsForSolidDrawing();

    //Add differential weights at the end of the cloth
    //solve the problem of tip curling at the end - make the last row heavier!
    int i = m_weightSteps;
    for (int z = m_verticalParticleCount - m_weightSteps; z < 
      m_verticalParticleCount; z++, i--)
    {
        for (int x = 0; x < m_horizontalParticleCount; x++)
        {
            int id = getIdFromCoordinates(z, x);
            Particle* p = (*m_particleList)[id];
            p->setMass(p->getMass() * m_maxLastRowWeight / i);
        }
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_abe59f6418666b9a4ce7e5ed593073331_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=390pt]{class_cloth_abe59f6418666b9a4ce7e5ed593073331_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ac75b4a4e7bebcbb1e4e3305ff59c6e32}{
\index{Cloth@{Cloth}!createTextures@{createTextures}}
\index{createTextures@{createTextures}!Cloth@{Cloth}}
\subsubsection[{createTextures}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::createTextures (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_ac75b4a4e7bebcbb1e4e3305ff59c6e32}


create textures, loading them from file 



Definition at line 908 of file Cloth.cpp.



References ClothMaterial::getTextureName(), loadimgdata(), m\_\-textureCount, m\_\-textureHandler, m\_\-textureHeight, and m\_\-textureWidth.


\begin{DoxyCode}
{
    //creating texture objects and returning handlers
    glGenTextures(m_textureCount - 1, &m_textureHandler[0]);

    ClothMaterial* currentMaterial = 0;
    for (int i = 0; i < m_textureCount; i++)
    {
        //get cloth material
        currentMaterial = (*m_clothMaterialList)[i];

        //load texture into the texture object
        glBindTexture(GL_TEXTURE_2D, m_textureHandler[i]);

        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);

        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);

        glTexImage2D(GL_TEXTURE_2D, 0, 4, m_textureWidth , m_textureHeight, 0, GL
      _RGBA,GL_UNSIGNED_BYTE, loadimgdata(currentMaterial->getTextureName()));
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=378pt]{class_cloth_ac75b4a4e7bebcbb1e4e3305ff59c6e32_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ac75b4a4e7bebcbb1e4e3305ff59c6e32_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_af69c4b6f2c8a1b2524068d1e9e4f92b5}{
\index{Cloth@{Cloth}!deleteParticles@{deleteParticles}}
\index{deleteParticles@{deleteParticles}!Cloth@{Cloth}}
\subsubsection[{deleteParticles}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::deleteParticles (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_af69c4b6f2c8a1b2524068d1e9e4f92b5}


delete particles structural horizontal rest length 



Definition at line 84 of file Cloth.cpp.



References m\_\-particleInQuadList, m\_\-particleList, and m\_\-springList.


\begin{DoxyCode}
{
    //delete quad list
    delete m_particleInQuadList;

    //delete springs
    for (int i = 0; i < m_springList->size(); i++) delete (*m_springList)[i];
    delete m_springList;

    //delete particles
    for (int i = 0; i < m_particleList->size(); i++) delete (*m_particleList)[i];
      
    delete m_particleList;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=300pt]{class_cloth_af69c4b6f2c8a1b2524068d1e9e4f92b5_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a79b3e844ec62c2f6112a473ab86ca8c3}{
\index{Cloth@{Cloth}!determineIfIsANeighbourAndGetColour@{determineIfIsANeighbourAndGetColour}}
\index{determineIfIsANeighbourAndGetColour@{determineIfIsANeighbourAndGetColour}!Cloth@{Cloth}}
\subsubsection[{determineIfIsANeighbourAndGetColour}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Colour Cloth::determineIfIsANeighbourAndGetColour (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-mainId, }
\item[{const int}]{\_\-testId}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a79b3e844ec62c2f6112a473ab86ca8c3}


check if a particle is a neighbour of a center particle under consideration and returns a specific colour based on the type of spring 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-mainId} & the id of the center particle, who has the neighbour list \\
\hline
\mbox{\tt in}  & {\em \_\-testId} & the id of the particle that we are checking in the neighbour list \\
\hline
\end{DoxyParams}


Definition at line 642 of file Cloth.cpp.



References FLEX\_\-SPRING, Spring::getEndNode(), Particle::getId(), Particle::getNeighbourList(), Spring::getSpringType(), Configuration::s\_\-flexNeighbourTraceColour, Configuration::s\_\-neighbourTraceColour, Configuration::s\_\-normalColour, Configuration::s\_\-shearNeighbourTraceColour, Configuration::s\_\-structuralNeighbourTraceColour, SHEAR\_\-SPRING, and STRUCTURAL\_\-SPRING.


\begin{DoxyCode}
{
    //get neighbours of mainId
    Particle* mainParticle = (*m_particleList)[_mainId];
    std::vector<Spring*>* neighbours = mainParticle->getNeighbourList();

    ngl::Colour finalColour(Configuration::s_normalColour);
    Spring* spring = 0;
    for (int i = 0; i < neighbours->size(); i++)
    {
        spring = (*neighbours)[i];
        if (spring->getEndNode()->getId() == _testId)
        {
            //set neighbour trace colour
            finalColour.set(Configuration::s_neighbourTraceColour);

            //set colour based on spring type
            if (spring->getSpringType() == STRUCTURAL_SPRING)
                finalColour.set(Configuration::s_structuralNeighbourTraceColour);
      
            else if (spring->getSpringType() == SHEAR_SPRING)
                finalColour.set(Configuration::s_shearNeighbourTraceColour);
            else if (spring->getSpringType() == FLEX_SPRING)
                finalColour.set(Configuration::s_flexNeighbourTraceColour);

            break;
        }
    }

    return finalColour;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a79b3e844ec62c2f6112a473ab86ca8c3_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a79b3e844ec62c2f6112a473ab86ca8c3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a9c255e372971e0a67659a9e4c5a2d770}{
\index{Cloth@{Cloth}!determineInternalSpringForce@{determineInternalSpringForce}}
\index{determineInternalSpringForce@{determineInternalSpringForce}!Cloth@{Cloth}}
\subsubsection[{determineInternalSpringForce}]{\setlength{\rightskip}{0pt plus 5cm}float Cloth::determineInternalSpringForce (
\begin{DoxyParamCaption}
\item[{{\bf Spring} $\ast$}]{o\_\-spring}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a9c255e372971e0a67659a9e4c5a2d770}


determine spring force in a spring 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em o\_\-spring} & spring to be modified with hookes force \\
\hline
\end{DoxyParams}


Definition at line 826 of file Cloth.cpp.



References Particle::addToNetForce(), Spring::getEndNode(), Particle::getPosition(), Spring::getRestLength(), Spring::getRootNode(), Particle::getVelocity(), m\_\-damping, and m\_\-stiffness.


\begin{DoxyCode}
{
    //get vector from current to neighbour
    ngl::Vector AB = o_spring->getRootNode()->getPosition() - o_spring->
      getEndNode()->getPosition();
    float L = AB.length();

    //get relative velocity between 2 particles of the spring
    ngl::Vector V = o_spring->getRootNode()->getVelocity() - o_spring->
      getEndNode()->getVelocity();

    //calculate hooke's force on spring
    AB.normalize();
    ngl::Vector force_spring = -(m_stiffness * (L - o_spring->getRestLength()) * 
      AB);
    ngl::Vector force_damping = -(m_damping * V);

    if (force_damping.length() > 0.8)
    {
        force_damping.normalize();
        force_damping = 0.8 * force_damping;
    }

    ngl::Vector netForce = force_spring + force_damping;

    //apply to both particles
    o_spring->getRootNode()->addToNetForce(netForce);
    o_spring->getEndNode()->addToNetForce(-netForce);

    return force_damping.length();
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a9c255e372971e0a67659a9e4c5a2d770_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a9c255e372971e0a67659a9e4c5a2d770_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ab273d82cd73bb5bb76adfc06c4ee2d0d}{
\index{Cloth@{Cloth}!determineParticleColor@{determineParticleColor}}
\index{determineParticleColor@{determineParticleColor}!Cloth@{Cloth}}
\subsubsection[{determineParticleColor}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Colour Cloth::determineParticleColor (
\begin{DoxyParamCaption}
\item[{const {\bf Particle} $\ast$}]{\_\-particle}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_ab273d82cd73bb5bb76adfc06c4ee2d0d}


determine the colour to be applied to a particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-particle} & the particle whose colour is to be set \\
\hline
\end{DoxyParams}


Definition at line 608 of file Cloth.cpp.



References determineIfIsANeighbourAndGetColour(), Particle::getId(), m\_\-enableInternalTrace, m\_\-enableInternalTraceNeighbours, m\_\-internalTraceParticleId, Configuration::s\_\-mainTraceColour, and Configuration::s\_\-normalColour.


\begin{DoxyCode}
{
    //initialise to default normal particle colour
    ngl::Colour finalColour(0, 0, 0);
    finalColour.set(Configuration::s_normalColour);

    if (!m_enableInternalTrace)
    {
        //no tracing -> display normal colour
        return finalColour;
    }

    //we are tracing -> check if we are the main particle
    if (m_internalTraceParticleId == _particle->getId())
    {
        //thats us -> display main trace colour
        finalColour.set(Configuration::s_mainTraceColour);
        return finalColour;
    }

    //we are tracing and we are not the main particle
    if (m_enableInternalTraceNeighbours)
    {
        //we are tracing neighbours also -> lets check if we are among neighbours
      

        finalColour.set(determineIfIsANeighbourAndGetColour(
      m_internalTraceParticleId, _particle->getId()));
        return finalColour;
    }

    //maybe no match -> safety return
    return finalColour;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ab273d82cd73bb5bb76adfc06c4ee2d0d_cgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ae4fa0f12a25c98cbde3be24b775c4dc7}{
\index{Cloth@{Cloth}!draw@{draw}}
\index{draw@{draw}!Cloth@{Cloth}}
\subsubsection[{draw}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::draw (
\begin{DoxyParamCaption}
\item[{ngl::TransformStack}]{\_\-txStack, }
\item[{{\bf ShaderManager} $\ast$}]{io\_\-sman, }
\item[{const std::string}]{\_\-wireframeShader, }
\item[{const std::string}]{\_\-textureShader}
\end{DoxyParamCaption}
)}}
\label{class_cloth_ae4fa0f12a25c98cbde3be24b775c4dc7}


draws the particles 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-txStack} & the transform stack, used for pushing and popping opengl states \\
\hline
\mbox{\tt in,out}  & {\em io\_\-sman} & the shader manager, used for shading/rendering of the objects \\
\hline
\mbox{\tt in}  & {\em \_\-wireframeShader} & the wireframe shader used for particle drawing \\
\hline
\mbox{\tt in}  & {\em \_\-textureShader} & the texture shader used for shaded drawing \\
\hline
\end{DoxyParams}


Definition at line 508 of file Cloth.cpp.



References Particle::getMoveable(), Particle::getPosition(), Particle::setPosition(), ShaderManager::updateColor(), ShaderManager::updateModel(), and ShaderManager::updateModelColor().


\begin{DoxyCode}
{
    //if not wireframe enabled, draw solid shaded quad
    if (!m_drawWireframe)
    {
        //add positions to the vextex array
        Particle* p = 0;
        for (int i = 0; i < m_particleInQuadList->size(); i++)
        {
            p = (*m_particleInQuadList)[i];

            m_particleQuadPositionList[i] = p->getPosition();
        }

        _txStack.pushTransform();
        {
            //update transform
            io_sman->updateModel(_textureShader, _txStack.getCurrAndGlobal().getM
      atrix());

            glEnableClientState(GL_VERTEX_ARRAY);
            glVertexPointer(4, GL_FLOAT, 0, &m_particleQuadPositionList[0]);

            glEnableClientState(GL_TEXTURE_COORD_ARRAY);
            glTexCoordPointer(2, GL_FLOAT, 0, &m_textureCoords[0]);

            glBindTexture(GL_TEXTURE_2D, m_textureHandler[
      m_currentClothMaterialIndex]);

            for (int i = 0; i < m_particleQuadPositionList.size(); i += 4)
            {
                glDrawArrays(GL_QUADS, i, 4);
            }

            glDisableClientState(GL_VERTEX_ARRAY);
            glDisableClientState(GL_TEXTURE_COORD_ARRAY);
        }
        _txStack.popTransform();
    }
    else
    {
        //add positions to the vextex array
        Particle* p = 0;
        for (int i = 0; i < m_particleList->size(); i++)
        {
            p = (*m_particleList)[i];

            m_particlePositionList[i] = p->getPosition();
        }

        _txStack.pushTransform();
        {
            //update transform
            io_sman->updateModel(_wireframeShader, _txStack.getCurrAndGlobal().ge
      tMatrix());

            glEnableClientState(GL_VERTEX_ARRAY);
            glVertexPointer(4, GL_FLOAT, 0, &m_particlePositionList[0]);

            glPointSize(m_particleRadius);

            for (int i = 0; i < m_particlePositionList.size(); i++)
            {
                io_sman->updateColor(_wireframeShader, determineParticleColor((*
      m_particleList)[i]), false);

                glDrawArrays(GL_POINTS, i, 1);
            }

            glDisableClientState(GL_VERTEX_ARRAY);
        }
        _txStack.popTransform();
    }

    //draw pins at fixed points
    Particle* currentParticle = 0;
    for (int i = 0; i < m_particleList->size(); i++)
    {
        currentParticle = (*m_particleList)[i];

        if (!currentParticle->getMoveable())
        {
            //draw sphere at position

            _txStack.pushTransform();
            {
                //update shader
                _txStack.setPosition(currentParticle->getPosition().m_x, currentP
      article->getPosition().m_y, currentParticle->getPosition().m_z);
                _txStack.setScale(0.4, 0.4, 0.4);
                io_sman->updateModelColor("Light", _txStack.getCurrAndGlobal().ge
      tMatrix(), ngl::Colour(1, 1, 0));

                ngl::VBOPrimitives *prim=ngl::VBOPrimitives::instance();
                prim->draw("cube");
            }
            _txStack.popTransform();
        }
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=352pt]{class_cloth_ae4fa0f12a25c98cbde3be24b775c4dc7_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=322pt]{class_cloth_ae4fa0f12a25c98cbde3be24b775c4dc7_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a82cb5da97073e44dd98d56662c66cd0e}{
\index{Cloth@{Cloth}!evaluateEularExplicit@{evaluateEularExplicit}}
\index{evaluateEularExplicit@{evaluateEularExplicit}!Cloth@{Cloth}}
\subsubsection[{evaluateEularExplicit}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::evaluateEularExplicit (
\begin{DoxyParamCaption}
\item[{{\bf Particle} $\ast$}]{io\_\-currentParticle}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a82cb5da97073e44dd98d56662c66cd0e}


integrate a particle using eular explicit 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-currentParticle} & the particle that is being affected \\
\hline
\end{DoxyParams}


Definition at line 855 of file Cloth.cpp.



References Particle::getMass(), Particle::getNetForce(), Particle::getPosition(), Particle::getVelocity(), m\_\-timestep, Particle::setVelocity(), and Particle::updatePosition().


\begin{DoxyCode}
{
    //use Newton's 2nd law F = ma => get accelation a = F / m
    ngl::Vector acceleration = currentParticle->getNetForce() / currentParticle->
      getMass();

    //use a = d(v) / dt => integrate to get velocity v
    currentParticle->setVelocity(currentParticle->getVelocity() + (acceleration *
       m_timestep));

    //use v = d(s) / dt => integrate to get displacement s
    currentParticle->updatePosition(currentParticle->getPosition() + (currentPart
      icle->getVelocity() * m_timestep));
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=372pt]{class_cloth_a82cb5da97073e44dd98d56662c66cd0e_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a82cb5da97073e44dd98d56662c66cd0e_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a53bce85da93eba6928cc17046e06f8bd}{
\index{Cloth@{Cloth}!evaluateNetForces@{evaluateNetForces}}
\index{evaluateNetForces@{evaluateNetForces}!Cloth@{Cloth}}
\subsubsection[{evaluateNetForces}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::evaluateNetForces (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a53bce85da93eba6928cc17046e06f8bd}


evaluate net force on the particles 



Definition at line 734 of file Cloth.cpp.



References Particle::addToNetForce(), addWindForceOnTriangle(), Particle::clearNetForce(), determineInternalSpringForce(), FLEX\_\-SPRING, Particle::getMass(), Spring::getSpringType(), m\_\-enableGravity, m\_\-enableHookeBend, m\_\-enableHookeStretch, m\_\-enableHookeStructural, m\_\-particleInQuadList, m\_\-particleList, m\_\-springList, m\_\-windDirection, m\_\-windEnabled, Configuration::s\_\-accelerationOfFreeFall, SHEAR\_\-SPRING, and STRUCTURAL\_\-SPRING.


\begin{DoxyCode}
{
    //apply gravity to each particle
    Particle* currentParticle = 0;
    for (int i = 0; i < m_particleList->size(); i++)
    {
        //evaluate net force of neighbours on current particle
        currentParticle = (*m_particleList)[i];

        //clear net force
        currentParticle->clearNetForce();

        //adds in gravity
        if (m_enableGravity) currentParticle->addToNetForce(new ngl::Vector(0, cu
      rrentParticle->getMass() * Configuration::s_accelerationOfFreeFall, 0));
    }

    //apply wind to each triangle
    if (m_windEnabled)
    {
        for (int i = 0; i < m_particleInQuadList->size(); i += 4)
        {
            //for example, consider the following grid
            //0 1 2
            //3 4 5
            //quad list : 1 0 3 4 # 2 1 4 5
            //triangles in quad 1 = 1 0 3 # 4 1 3
            //triangles in quad 2 = 2 1 4 # 5 2 4
            addWindForceOnTriangle((*m_particleInQuadList)[i], (*
      m_particleInQuadList)[i+1], (*m_particleInQuadList)[i+2], m_windDirection);
            addWindForceOnTriangle((*m_particleInQuadList)[i+3], (*
      m_particleInQuadList)[i], (*m_particleInQuadList)[i+2], m_windDirection);
        }
    }

    //apply spring force/hooke's law to each spring
    for (int i = 0; i < m_springList->size(); i++)
    {
        //get current spring
        Spring* currentSpring = (*m_springList)[i];

        if ((!m_enableHookeStructural) && (currentSpring->getSpringType() == 
      STRUCTURAL_SPRING)) continue;
        if ((!m_enableHookeStretch) && (currentSpring->getSpringType() == 
      SHEAR_SPRING)) continue;
        if ((!m_enableHookeBend) && (currentSpring->getSpringType() == 
      FLEX_SPRING)) continue;

        //calculate spring force
        determineInternalSpringForce(currentSpring);
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a53bce85da93eba6928cc17046e06f8bd_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a53bce85da93eba6928cc17046e06f8bd_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a4c2efc854ad5bed4013cad829fa55b6f}{
\index{Cloth@{Cloth}!evaluateVerlet@{evaluateVerlet}}
\index{evaluateVerlet@{evaluateVerlet}!Cloth@{Cloth}}
\subsubsection[{evaluateVerlet}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::evaluateVerlet (
\begin{DoxyParamCaption}
\item[{{\bf Particle} $\ast$}]{io\_\-currentParticle}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a4c2efc854ad5bed4013cad829fa55b6f}


integrate a particle using verlet 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-currentParticle} & the particle that is being affected \\
\hline
\end{DoxyParams}


Definition at line 867 of file Cloth.cpp.



References Particle::getLastPosition(), Particle::getMass(), Particle::getNetForce(), Particle::getPosition(), m\_\-timestep, Particle::setVelocity(), and Particle::updatePosition().


\begin{DoxyCode}
{
    //use Newton's 2nd law F = ma => get accelation a = F / m
    ngl::Vector acceleration = currentParticle->getNetForce() / currentParticle->
      getMass();

    //verlet integration to calculate displacement froma acceleration directly
    ngl::Vector nextPosition = (2 * currentParticle->getPosition()) - currentPart
      icle->getLastPosition() + (acceleration * m_timestep * m_timestep);

    //derive velocity
    ngl::Vector velocity = (nextPosition - currentParticle->getLastPosition()) / 
      (2 * m_timestep);
    currentParticle->setVelocity(velocity);

    currentParticle->updatePosition(nextPosition);
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=346pt]{class_cloth_a4c2efc854ad5bed4013cad829fa55b6f_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a4c2efc854ad5bed4013cad829fa55b6f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a22c40ebcfd07d49657e82150bdada604}{
\index{Cloth@{Cloth}!getClothMaterialByName@{getClothMaterialByName}}
\index{getClothMaterialByName@{getClothMaterialByName}!Cloth@{Cloth}}
\subsubsection[{getClothMaterialByName}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ClothMaterial} $\ast$ Cloth::getClothMaterialByName (
\begin{DoxyParamCaption}
\item[{const std::string}]{\_\-name, }
\item[{int \&}]{o\_\-index, }
\item[{float \&}]{o\_\-stiffness, }
\item[{float \&}]{o\_\-damping}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a22c40ebcfd07d49657e82150bdada604}


returns a cloth material object and its index, given a name 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-name} & the name of the material to search for \\
\hline
\mbox{\tt out}  & {\em o\_\-index} & the index of the searched material \\
\hline
\mbox{\tt out}  & {\em o\_\-stiffness} & the stiffness of the searched material \\
\hline
\mbox{\tt out}  & {\em o\_\-damping} & the damping of the searched material \\
\hline
\end{DoxyParams}


Definition at line 971 of file Cloth.cpp.



References ClothMaterial::getDamping(), ClothMaterial::getName(), and ClothMaterial::getStiffness().


\begin{DoxyCode}
{
    ClothMaterial* item = 0;
    for (int i = 0; i < m_clothMaterialList->size(); i++)
    {
        item = (*m_clothMaterialList)[i];

        if (item->getName() == _name)
        {
            o_index = i;
            o_stiffness = item->getStiffness();
            o_damping = item->getDamping();
            return item;
        }
    }

    //not found -> return default @ index 0
    item = (*m_clothMaterialList)[0];
    o_index = 0;
    o_stiffness = item->getStiffness();
    o_damping = item->getDamping();
    return item;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a22c40ebcfd07d49657e82150bdada604_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a22c40ebcfd07d49657e82150bdada604_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a249ce32ebe9b92ef8fb2beb7c8f8bcce}{
\index{Cloth@{Cloth}!getCurrentClothMaterial@{getCurrentClothMaterial}}
\index{getCurrentClothMaterial@{getCurrentClothMaterial}!Cloth@{Cloth}}
\subsubsection[{getCurrentClothMaterial}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ClothMaterial}$\ast$ Cloth::getCurrentClothMaterial (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a249ce32ebe9b92ef8fb2beb7c8f8bcce}


returns the current material object 



Definition at line 195 of file Cloth.h.



References m\_\-currentClothMaterial.


\begin{DoxyCode}
{ return m_currentClothMaterial; }
\end{DoxyCode}
\hypertarget{class_cloth_acf607cf5cc2df100a742697726e83f62}{
\index{Cloth@{Cloth}!getCurrentClothMaterialIndex@{getCurrentClothMaterialIndex}}
\index{getCurrentClothMaterialIndex@{getCurrentClothMaterialIndex}!Cloth@{Cloth}}
\subsubsection[{getCurrentClothMaterialIndex}]{\setlength{\rightskip}{0pt plus 5cm}int Cloth::getCurrentClothMaterialIndex (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_acf607cf5cc2df100a742697726e83f62}


returns the current material index 



Definition at line 198 of file Cloth.h.



References m\_\-currentClothMaterialIndex.


\begin{DoxyCode}
{ return m_currentClothMaterialIndex; }
\end{DoxyCode}
\hypertarget{class_cloth_afb6cc65c406782be68dadf1bb991f29f}{
\index{Cloth@{Cloth}!getCurrentClothMaterialName@{getCurrentClothMaterialName}}
\index{getCurrentClothMaterialName@{getCurrentClothMaterialName}!Cloth@{Cloth}}
\subsubsection[{getCurrentClothMaterialName}]{\setlength{\rightskip}{0pt plus 5cm}std::string Cloth::getCurrentClothMaterialName (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_afb6cc65c406782be68dadf1bb991f29f}


returns the current material name 



Definition at line 192 of file Cloth.h.



References ClothMaterial::getName(), and m\_\-currentClothMaterial.


\begin{DoxyCode}
{ return m_currentClothMaterial->getName(); }
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_afb6cc65c406782be68dadf1bb991f29f_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_afb6cc65c406782be68dadf1bb991f29f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ae06b3255fd2b222712e02feb68d6aaa9}{
\index{Cloth@{Cloth}!getDamping@{getDamping}}
\index{getDamping@{getDamping}!Cloth@{Cloth}}
\subsubsection[{getDamping}]{\setlength{\rightskip}{0pt plus 5cm}float Cloth::getDamping (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_ae06b3255fd2b222712e02feb68d6aaa9}


returns the current damping coefficient of the simulation 



Definition at line 208 of file Cloth.h.



References m\_\-damping.


\begin{DoxyCode}
{ return m_damping; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ae06b3255fd2b222712e02feb68d6aaa9_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a7c49d2bed665097229ad5e1394b76d4a}{
\index{Cloth@{Cloth}!getDefaultClothMaterial@{getDefaultClothMaterial}}
\index{getDefaultClothMaterial@{getDefaultClothMaterial}!Cloth@{Cloth}}
\subsubsection[{getDefaultClothMaterial}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ClothMaterial} $\ast$ Cloth::getDefaultClothMaterial (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a7c49d2bed665097229ad5e1394b76d4a}


returns the default cloth material object 



Definition at line 965 of file Cloth.cpp.



References getClothMaterialByName(), m\_\-currentClothMaterialIndex, m\_\-damping, and m\_\-stiffness.


\begin{DoxyCode}
{
    return getClothMaterialByName("Vintage", m_currentClothMaterialIndex, 
      m_stiffness, m_damping);
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a7c49d2bed665097229ad5e1394b76d4a_cgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_acd03b4325b68237891eea91de9e9a2d8}{
\index{Cloth@{Cloth}!getDrawWireframe@{getDrawWireframe}}
\index{getDrawWireframe@{getDrawWireframe}!Cloth@{Cloth}}
\subsubsection[{getDrawWireframe}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::getDrawWireframe (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_acd03b4325b68237891eea91de9e9a2d8}


returns the wireframe toggle value 



Definition at line 178 of file Cloth.h.



References m\_\-drawWireframe.


\begin{DoxyCode}
{ return m_drawWireframe; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=382pt]{class_cloth_acd03b4325b68237891eea91de9e9a2d8_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a8c128ccda5f7e028a474fd63b04203a3}{
\index{Cloth@{Cloth}!getEnableAutoCloth@{getEnableAutoCloth}}
\index{getEnableAutoCloth@{getEnableAutoCloth}!Cloth@{Cloth}}
\subsubsection[{getEnableAutoCloth}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::getEnableAutoCloth (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a8c128ccda5f7e028a474fd63b04203a3}


returns wherether automatic cloth movement is enabled 



Definition at line 165 of file Cloth.h.



References m\_\-enableAutoCloth.


\begin{DoxyCode}
{ return m_enableAutoCloth; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a8c128ccda5f7e028a474fd63b04203a3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a838c5a4dd71c46612ee953c46463ccfa}{
\index{Cloth@{Cloth}!getEnableGravity@{getEnableGravity}}
\index{getEnableGravity@{getEnableGravity}!Cloth@{Cloth}}
\subsubsection[{getEnableGravity}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::getEnableGravity (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a838c5a4dd71c46612ee953c46463ccfa}


returns the toggle value for gravity 



Definition at line 240 of file Cloth.h.



References m\_\-enableGravity.


\begin{DoxyCode}
{ return m_enableGravity; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=376pt]{class_cloth_a838c5a4dd71c46612ee953c46463ccfa_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a2f23ed8fead11334f05639d19052e403}{
\index{Cloth@{Cloth}!getEnableHookeBend@{getEnableHookeBend}}
\index{getEnableHookeBend@{getEnableHookeBend}!Cloth@{Cloth}}
\subsubsection[{getEnableHookeBend}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::getEnableHookeBend (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a2f23ed8fead11334f05639d19052e403}


returns the toggle for bend spring of the simulation 



Definition at line 282 of file Cloth.h.



References m\_\-enableHookeBend.


\begin{DoxyCode}
{ return m_enableHookeBend; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=396pt]{class_cloth_a2f23ed8fead11334f05639d19052e403_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ad55f393d76ad6f83c794005a2131ab40}{
\index{Cloth@{Cloth}!getEnableHookeStretch@{getEnableHookeStretch}}
\index{getEnableHookeStretch@{getEnableHookeStretch}!Cloth@{Cloth}}
\subsubsection[{getEnableHookeStretch}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::getEnableHookeStretch (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_ad55f393d76ad6f83c794005a2131ab40}


returns the toggle for the stretch spring of the simulation 



Definition at line 275 of file Cloth.h.



References m\_\-enableHookeStretch.


\begin{DoxyCode}
{ return m_enableHookeStretch; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ad55f393d76ad6f83c794005a2131ab40_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_abc31a3b10698c87c85b91f4314a0ace4}{
\index{Cloth@{Cloth}!getEnableHookeStructural@{getEnableHookeStructural}}
\index{getEnableHookeStructural@{getEnableHookeStructural}!Cloth@{Cloth}}
\subsubsection[{getEnableHookeStructural}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::getEnableHookeStructural (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_abc31a3b10698c87c85b91f4314a0ace4}


returns the toggle value for structural spring of the simulation 



Definition at line 268 of file Cloth.h.



References m\_\-enableHookeStructural.


\begin{DoxyCode}
{ return m_enableHookeStructural; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_abc31a3b10698c87c85b91f4314a0ace4_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a2e4e6284ea719634e35579c1e5dd2b8e}{
\index{Cloth@{Cloth}!getEnableInternalTrace@{getEnableInternalTrace}}
\index{getEnableInternalTrace@{getEnableInternalTrace}!Cloth@{Cloth}}
\subsubsection[{getEnableInternalTrace}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::getEnableInternalTrace (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a2e4e6284ea719634e35579c1e5dd2b8e}


returns whether internal tracing is enabled 



Definition at line 128 of file Cloth.h.



References m\_\-enableInternalTrace.


\begin{DoxyCode}
{ return m_enableInternalTrace; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a2e4e6284ea719634e35579c1e5dd2b8e_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a621c9420f115e921de833b274113f63d}{
\index{Cloth@{Cloth}!getEnableInternalTraceNeighbours@{getEnableInternalTraceNeighbours}}
\index{getEnableInternalTraceNeighbours@{getEnableInternalTraceNeighbours}!Cloth@{Cloth}}
\subsubsection[{getEnableInternalTraceNeighbours}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::getEnableInternalTraceNeighbours (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a621c9420f115e921de833b274113f63d}


returns whether internal tracing with neighbours is enabled 



Definition at line 135 of file Cloth.h.



References m\_\-enableInternalTraceNeighbours.


\begin{DoxyCode}
{ return m_enableInternalTraceNeighbours; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a621c9420f115e921de833b274113f63d_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a1f193ecc812a71cbb799de6c7df302b0}{
\index{Cloth@{Cloth}!getEnableWind@{getEnableWind}}
\index{getEnableWind@{getEnableWind}!Cloth@{Cloth}}
\subsubsection[{getEnableWind}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::getEnableWind (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a1f193ecc812a71cbb799de6c7df302b0}


returns the toggle value for wind 



Definition at line 247 of file Cloth.h.



References m\_\-windEnabled.


\begin{DoxyCode}
{ return m_windEnabled; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=368pt]{class_cloth_a1f193ecc812a71cbb799de6c7df302b0_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a256ace3111542ff6a2bf4b0b4a05ac57}{
\index{Cloth@{Cloth}!getHeight@{getHeight}}
\index{getHeight@{getHeight}!Cloth@{Cloth}}
\subsubsection[{getHeight}]{\setlength{\rightskip}{0pt plus 5cm}int Cloth::getHeight (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a256ace3111542ff6a2bf4b0b4a05ac57}


returns the height of the cloth 



Definition at line 219 of file Cloth.h.



References m\_\-height.


\begin{DoxyCode}
{ return m_height; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=342pt]{class_cloth_a256ace3111542ff6a2bf4b0b4a05ac57_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a50d241cd3aedf209480abdc1ffb34afe}{
\index{Cloth@{Cloth}!getHorizontalParticleCount@{getHorizontalParticleCount}}
\index{getHorizontalParticleCount@{getHorizontalParticleCount}!Cloth@{Cloth}}
\subsubsection[{getHorizontalParticleCount}]{\setlength{\rightskip}{0pt plus 5cm}int Cloth::getHorizontalParticleCount (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a50d241cd3aedf209480abdc1ffb34afe}


returns the count of particle in the horizontal direction 



Definition at line 162 of file Cloth.h.



References m\_\-horizontalParticleCount.


\begin{DoxyCode}
{ return m_horizontalParticleCount; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a50d241cd3aedf209480abdc1ffb34afe_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a47be21da0ba13f706fd38d1051823ea1}{
\index{Cloth@{Cloth}!getIdFromCoordinates@{getIdFromCoordinates}}
\index{getIdFromCoordinates@{getIdFromCoordinates}!Cloth@{Cloth}}
\subsubsection[{getIdFromCoordinates}]{\setlength{\rightskip}{0pt plus 5cm}int Cloth::getIdFromCoordinates (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-z, }
\item[{const int}]{\_\-x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a47be21da0ba13f706fd38d1051823ea1}


returns an id from z,x coordinates 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-z} & z coordinate \\
\hline
\mbox{\tt in}  & {\em \_\-x} & x coordinate \\
\hline
\end{DoxyParams}


Definition at line 897 of file Cloth.cpp.



References m\_\-horizontalParticleCount.


\begin{DoxyCode}
{
    return (z * m_horizontalParticleCount) + x;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a47be21da0ba13f706fd38d1051823ea1_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a8b1296a9b6c7665de668c1da64e475f1}{
\index{Cloth@{Cloth}!getIntegrationType@{getIntegrationType}}
\index{getIntegrationType@{getIntegrationType}!Cloth@{Cloth}}
\subsubsection[{getIntegrationType}]{\setlength{\rightskip}{0pt plus 5cm}{\bf IntegrationType} Cloth::getIntegrationType (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a8b1296a9b6c7665de668c1da64e475f1}


returns the integration algorithm for the simulation 



Definition at line 171 of file Cloth.h.



References m\_\-integrationType.


\begin{DoxyCode}
{ return m_integrationType; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=382pt]{class_cloth_a8b1296a9b6c7665de668c1da64e475f1_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a775c037217b62163b09fc01e91793347}{
\index{Cloth@{Cloth}!getInternalTraceParticle@{getInternalTraceParticle}}
\index{getInternalTraceParticle@{getInternalTraceParticle}!Cloth@{Cloth}}
\subsubsection[{getInternalTraceParticle}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Particle}$\ast$ Cloth::getInternalTraceParticle (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a775c037217b62163b09fc01e91793347}


returns the particle that is currently traced 



Definition at line 145 of file Cloth.h.



References m\_\-internalTraceParticleId, and m\_\-particleList.


\begin{DoxyCode}
{ return (*m_particleList)[m_internalTraceParticleId]; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a775c037217b62163b09fc01e91793347_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a6f1531ec77fd22cdd15ffce0dc8d7cc9}{
\index{Cloth@{Cloth}!getInternalTraceParticleId@{getInternalTraceParticleId}}
\index{getInternalTraceParticleId@{getInternalTraceParticleId}!Cloth@{Cloth}}
\subsubsection[{getInternalTraceParticleId}]{\setlength{\rightskip}{0pt plus 5cm}int Cloth::getInternalTraceParticleId (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a6f1531ec77fd22cdd15ffce0dc8d7cc9}


returns the id of the particle that is currently being traced 



Definition at line 142 of file Cloth.h.



References m\_\-internalTraceParticleId.


\begin{DoxyCode}
{ return m_internalTraceParticleId; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a6f1531ec77fd22cdd15ffce0dc8d7cc9_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a2af13e028425bfe1f4322eaf8166cb46}{
\index{Cloth@{Cloth}!getScenario@{getScenario}}
\index{getScenario@{getScenario}!Cloth@{Cloth}}
\subsubsection[{getScenario}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ConstrainedScenario} Cloth::getScenario (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a2af13e028425bfe1f4322eaf8166cb46}


returns the current scenario of the simulation 



Definition at line 297 of file Cloth.h.



References m\_\-scenario.


\begin{DoxyCode}
{ return m_scenario; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a2af13e028425bfe1f4322eaf8166cb46_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a93b27ae83e8c857b441a4d4c5482caf7}{
\index{Cloth@{Cloth}!getStiffness@{getStiffness}}
\index{getStiffness@{getStiffness}!Cloth@{Cloth}}
\subsubsection[{getStiffness}]{\setlength{\rightskip}{0pt plus 5cm}float Cloth::getStiffness (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a93b27ae83e8c857b441a4d4c5482caf7}


returns the current stiffness of the simulation 



Definition at line 201 of file Cloth.h.



References m\_\-stiffness.


\begin{DoxyCode}
{ return m_stiffness; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a93b27ae83e8c857b441a4d4c5482caf7_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ad1a280ad0b6d38a3db36510cf16fd688}{
\index{Cloth@{Cloth}!getTimestep@{getTimestep}}
\index{getTimestep@{getTimestep}!Cloth@{Cloth}}
\subsubsection[{getTimestep}]{\setlength{\rightskip}{0pt plus 5cm}float Cloth::getTimestep (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_ad1a280ad0b6d38a3db36510cf16fd688}


returns the timestep of the simulation 



Definition at line 233 of file Cloth.h.



References m\_\-timestep.


\begin{DoxyCode}
{ return m_timestep; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=354pt]{class_cloth_ad1a280ad0b6d38a3db36510cf16fd688_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a96669fd9095450709b2843d970a14c72}{
\index{Cloth@{Cloth}!getVerticalParticleCount@{getVerticalParticleCount}}
\index{getVerticalParticleCount@{getVerticalParticleCount}!Cloth@{Cloth}}
\subsubsection[{getVerticalParticleCount}]{\setlength{\rightskip}{0pt plus 5cm}int Cloth::getVerticalParticleCount (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a96669fd9095450709b2843d970a14c72}


returns the count of particle in the vertical direction 



Definition at line 155 of file Cloth.h.



References m\_\-verticalParticleCount.


\begin{DoxyCode}
{ return m_verticalParticleCount; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a96669fd9095450709b2843d970a14c72_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a018ba2e44f3ab825d29eb0e009d0709c}{
\index{Cloth@{Cloth}!getWidth@{getWidth}}
\index{getWidth@{getWidth}!Cloth@{Cloth}}
\subsubsection[{getWidth}]{\setlength{\rightskip}{0pt plus 5cm}int Cloth::getWidth (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a018ba2e44f3ab825d29eb0e009d0709c}


returns the width of the cloth 



Definition at line 226 of file Cloth.h.



References m\_\-width.


\begin{DoxyCode}
{ return m_width; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=340pt]{class_cloth_a018ba2e44f3ab825d29eb0e009d0709c_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a7611f0720052545604a01edd24bdf0b1}{
\index{Cloth@{Cloth}!getWindDirection@{getWindDirection}}
\index{getWindDirection@{getWindDirection}!Cloth@{Cloth}}
\subsubsection[{getWindDirection}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Cloth::getWindDirection (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a7611f0720052545604a01edd24bdf0b1}


returns the wind direction 



Definition at line 257 of file Cloth.h.



References m\_\-windDirection.


\begin{DoxyCode}
{ return m_windDirection; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a7611f0720052545604a01edd24bdf0b1_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a485ba5d8ff190b3b6796b2c214827083}{
\index{Cloth@{Cloth}!getWindStrength@{getWindStrength}}
\index{getWindStrength@{getWindStrength}!Cloth@{Cloth}}
\subsubsection[{getWindStrength}]{\setlength{\rightskip}{0pt plus 5cm}float Cloth::getWindStrength (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a485ba5d8ff190b3b6796b2c214827083}


returns the wind strength 



Definition at line 250 of file Cloth.h.



References m\_\-windStrength.


\begin{DoxyCode}
{ return m_windStrength; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=374pt]{class_cloth_a485ba5d8ff190b3b6796b2c214827083_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a08163378d5d4aec1f13f6fb6dccfd40f}{
\index{Cloth@{Cloth}!getZXCoordinatesFromId@{getZXCoordinatesFromId}}
\index{getZXCoordinatesFromId@{getZXCoordinatesFromId}!Cloth@{Cloth}}
\subsubsection[{getZXCoordinatesFromId}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::getZXCoordinatesFromId (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-id, }
\item[{int \&}]{o\_\-z, }
\item[{int \&}]{o\_\-x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a08163378d5d4aec1f13f6fb6dccfd40f}


get z,x coordinates given an id 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-id} & id to be translated into z,x \\
\hline
\mbox{\tt out}  & {\em o\_\-z} & z coordinate \\
\hline
\mbox{\tt out}  & {\em o\_\-x} & x coordinate \\
\hline
\end{DoxyParams}


Definition at line 902 of file Cloth.cpp.



References m\_\-horizontalParticleCount.


\begin{DoxyCode}
{
    z = id / m_horizontalParticleCount;
    x = id % m_horizontalParticleCount;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a08163378d5d4aec1f13f6fb6dccfd40f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ad174665ffd8d7033d163d6b2dff2388e}{
\index{Cloth@{Cloth}!initialise@{initialise}}
\index{initialise@{initialise}!Cloth@{Cloth}}
\subsubsection[{initialise}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::initialise (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-height, }
\item[{const int}]{\_\-width, }
\item[{const int}]{\_\-verticalParticleCount, }
\item[{const int}]{\_\-horizontalParticleCount, }
\item[{const float}]{\_\-timestep, }
\item[{const {\bf IntegrationType}}]{\_\-integrationType}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_ad174665ffd8d7033d163d6b2dff2388e}


initialise cloth parameters 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-height} & height of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-width} & width of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-verticalParticleCount} & the number of particles in the vertical direction of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-horizontalParticleCount} & the number of particles in the horizontal direction of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-timestep} & the timestep of simulation \\
\hline
\mbox{\tt in}  & {\em \_\-integrationType} & the integration method \\
\hline
\end{DoxyParams}


Definition at line 135 of file Cloth.cpp.


\begin{DoxyCode}
{
    m_height = _height;
    m_width = _width;
    m_verticalParticleCount = _verticalParticleCount;
    m_horizontalParticleCount = _horizontalParticleCount;

    m_initialClothHeight = 20;

    //init timestep
    m_timestep = _timestep;

    //init integration method
    m_integrationType = _integrationType;

    //create the mass-spring particles
    createAndConnectParticles();
}
\end{DoxyCode}
\hypertarget{class_cloth_acca44e18ce4e7da4348e0a1051f8971c}{
\index{Cloth@{Cloth}!initialStaticConstraints@{initialStaticConstraints}}
\index{initialStaticConstraints@{initialStaticConstraints}!Cloth@{Cloth}}
\subsubsection[{initialStaticConstraints}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::initialStaticConstraints (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_acca44e18ce4e7da4348e0a1051f8971c}


setup static constraints and pinning based on current scenarios 



Definition at line 449 of file Cloth.cpp.



References BANNER, FLAG, getIdFromCoordinates(), LIGHT\_\-CURTAIN, m\_\-horizontalParticleCount, m\_\-scenario, m\_\-verticalParticleCount, pinAll(), pinColumn(), pinRow(), Particle::setMoveable(), SHELTER, SOLID\_\-CURTAIN, and TABLECLOTH.


\begin{DoxyCode}
{
    //unpin everything to start with
    pinAll(false);

    if (m_scenario == TABLECLOTH)
    {
        //unpin all
        pinAll(false);
    }
    else if (m_scenario == LIGHT_CURTAIN)
    {
        //pin down 2 topmost corner particles to be used as hanging contraints
        Particle* p = (*m_particleList)[0];
        p->setMoveable(false);

        p = (*m_particleList)[m_horizontalParticleCount - 1];
        p->setMoveable(false);
    }
    else if (m_scenario == SOLID_CURTAIN)
    {
        //pin first row
        pinRow(true, 0);
    }
    else if (m_scenario == SHELTER)
    {
        //pin first and last row
        pinRow(true, 0);
        pinRow(true, m_verticalParticleCount - 1);
    }
    else if (m_scenario == FLAG)
    {
        //pin down 2 leftmost corner particles to be used as hanging contraints
        Particle* p = (*m_particleList)[0];
        p->setMoveable(false);

        p = (*m_particleList)[getIdFromCoordinates(m_verticalParticleCount - 1, 0
      )];
        p->setMoveable(false);
    }
    else if (m_scenario == BANNER)
    {
        //pin first and last column
        pinColumn(true, 0);
        pinColumn(true, m_horizontalParticleCount - 1);
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_acca44e18ce4e7da4348e0a1051f8971c_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_acca44e18ce4e7da4348e0a1051f8971c_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a39c6542de6123d1f999ec703db92e85f}{
\index{Cloth@{Cloth}!integrateBackward@{integrateBackward}}
\index{integrateBackward@{integrateBackward}!Cloth@{Cloth}}
\subsubsection[{integrateBackward}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::integrateBackward (
\begin{DoxyParamCaption}
\item[{{\bf Particle} $\ast$}]{io\_\-currentParticle, }
\item[{const ngl::Vector}]{\_\-newPosition}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a39c6542de6123d1f999ec703db92e85f}


integrate backward when collsion occurs to maintain continuity in velocity and position 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-currentParticle} & the particle that is being affected \\
\hline
\mbox{\tt in}  & {\em \_\-newPosition} & the new position to integrate from \\
\hline
\end{DoxyParams}


Definition at line 715 of file Cloth.cpp.



References EULAR\_\-FORWARD, Particle::getLastLastPosition(), Particle::getLastPosition(), m\_\-integrationType, m\_\-timestep, Particle::setCurrentPosition(), Particle::setCurrentVelocity(), and VERLET.


\begin{DoxyCode}
{
    //move to new position
    currentParticle->setCurrentPosition(newPosition);

    //resolve velocity
    if (m_integrationType == EULAR_FORWARD)
    {
        //need to find new velocity to move from originating position to new posi
      tion
        currentParticle->setCurrentVelocity((newPosition - currentParticle->getLa
      stPosition()) / m_timestep);
    }
    else if (m_integrationType == VERLET)
    {
        //derive current velocity
        ngl::Vector velocity = (newPosition - currentParticle->getLastLastPositio
      n()) / (2 * m_timestep);
        currentParticle->setCurrentVelocity(velocity);
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=384pt]{class_cloth_a39c6542de6123d1f999ec703db92e85f_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a39c6542de6123d1f999ec703db92e85f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a9fda4288162377adeaedd272d6d2d908}{
\index{Cloth@{Cloth}!integrateNext@{integrateNext}}
\index{integrateNext@{integrateNext}!Cloth@{Cloth}}
\subsubsection[{integrateNext}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::integrateNext (
\begin{DoxyParamCaption}
\item[{{\bf Particle} $\ast$}]{io\_\-currentParticle}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a9fda4288162377adeaedd272d6d2d908}


integrate next velocity and position of a particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-currentParticle} & the particle that is being affected \\
\hline
\end{DoxyParams}


Definition at line 703 of file Cloth.cpp.



References EULAR\_\-FORWARD, evaluateEularExplicit(), evaluateVerlet(), m\_\-integrationType, and VERLET.


\begin{DoxyCode}
{
    //calls user-chosen integrator
    switch (m_integrationType)
    {
        case EULAR_FORWARD: { evaluateEularExplicit(currentParticle); break; }
        case VERLET: { evaluateVerlet(currentParticle); break; }

        default : break;
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a9fda4288162377adeaedd272d6d2d908_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a9fda4288162377adeaedd272d6d2d908_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a5eb1fef194490874f2f518a92e65031d}{
\index{Cloth@{Cloth}!isCollisionDetected@{isCollisionDetected}}
\index{isCollisionDetected@{isCollisionDetected}!Cloth@{Cloth}}
\subsubsection[{isCollisionDetected}]{\setlength{\rightskip}{0pt plus 5cm}bool Cloth::isCollisionDetected (
\begin{DoxyParamCaption}
\item[{{\bf ObstacleManager} $\ast$}]{\_\-obstacleManager, }
\item[{{\bf Particle} $\ast$}]{\_\-currentParticle, }
\item[{ngl::Vector \&}]{o\_\-newPosition}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a5eb1fef194490874f2f518a92e65031d}


check if collision occured by a particle 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-obstacleManager} & the obstacle manager containing all the obstacles \\
\hline
\mbox{\tt in}  & {\em \_\-currentParticle} & the particle being checked upon \\
\hline
\mbox{\tt out}  & {\em o\_\-newPosition} & the safe position in case collision occurs \\
\hline
\end{DoxyParams}


Definition at line 883 of file Cloth.cpp.



References ObstacleManager::checkAndResolveCollision(), Particle::getLastPosition(), and Particle::getPosition().


\begin{DoxyCode}
{
    bool isCollided = false;

    //check collision of current particle with obstacles
    isCollided = _obstacleManager->checkAndResolveCollision(_currentParticle->
      getPosition(), _currentParticle->getLastPosition(), 0.1, o_newPosition);

    return isCollided;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a5eb1fef194490874f2f518a92e65031d_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a5eb1fef194490874f2f518a92e65031d_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ad8a4e79d3a5b6704ac0a9a2e1ad11b82}{
\index{Cloth@{Cloth}!loadGeometry@{loadGeometry}}
\index{loadGeometry@{loadGeometry}!Cloth@{Cloth}}
\subsubsection[{loadGeometry}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::loadGeometry (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_cloth_ad8a4e79d3a5b6704ac0a9a2e1ad11b82}


creates vbo for drawing 



Definition at line 496 of file Cloth.cpp.



References createTextures().


\begin{DoxyCode}
{
    //create vbo for sphere
    ngl::VBOPrimitives* prim = ngl::VBOPrimitives::instance();
    prim->createVBOSphere("sphere", 0.2, 16);

    //create textures for solid shading
    createTextures();

}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ad8a4e79d3a5b6704ac0a9a2e1ad11b82_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=376pt]{class_cloth_ad8a4e79d3a5b6704ac0a9a2e1ad11b82_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a8bafb7e0921b70dee4ae6e7a75562748}{
\index{Cloth@{Cloth}!loadimgdata@{loadimgdata}}
\index{loadimgdata@{loadimgdata}!Cloth@{Cloth}}
\subsubsection[{loadimgdata}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char $\ast$ Cloth::loadimgdata (
\begin{DoxyParamCaption}
\item[{const std::string}]{\_\-filename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a8bafb7e0921b70dee4ae6e7a75562748}


reads an image file and return data 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-filename} & the name of the image \\
\hline
\end{DoxyParams}


Definition at line 932 of file Cloth.cpp.



References m\_\-textureHeight, and m\_\-textureWidth.


\begin{DoxyCode}
{
    //load image and return its color as an array
    QImage *image = new QImage();
    unsigned char *data;
    bool loaded = image->load(QString(filename.c_str()));

    unsigned int index = 0;
    if(loaded)
    {
        m_textureWidth = image->width();
        m_textureHeight = image->height();

        data = new unsigned char[m_textureWidth * m_textureHeight * 4];

        QRgb color;
        for (int y=0;y<m_textureHeight;++y)
        {
            for(int x=0;x<m_textureWidth;++x)
            {
                color = image->pixel(x,y);

                data[index++] =qRed(color);
                data[index++] =qGreen(color);
                data[index++] =qBlue(color);
                data[index++] =qAlpha(color);
            }
        }
    }

    return data;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a8bafb7e0921b70dee4ae6e7a75562748_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a2d1e49eb2f459c1ec6df8e5ff412d720}{
\index{Cloth@{Cloth}!pinAll@{pinAll}}
\index{pinAll@{pinAll}!Cloth@{Cloth}}
\subsubsection[{pinAll}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::pinAll (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-toBePinned}
\end{DoxyParamCaption}
)}}
\label{class_cloth_a2d1e49eb2f459c1ec6df8e5ff412d720}


toggle the pin value for all the particles 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-toBePinned} & the pin toggle value \\
\hline
\end{DoxyParams}


Definition at line 1006 of file Cloth.cpp.



References m\_\-particleList, and Particle::setMoveable().


\begin{DoxyCode}
{
    Particle* currentParticle = 0;
    for (int i = 0; i < m_particleList->size(); i++)
    {
        currentParticle = (*m_particleList)[i];

        currentParticle->setMoveable(!_toBePinned);
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=296pt]{class_cloth_a2d1e49eb2f459c1ec6df8e5ff412d720_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a2d1e49eb2f459c1ec6df8e5ff412d720_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_af5c6cdf8ec2507786972cfc88463dcf4}{
\index{Cloth@{Cloth}!pinColumn@{pinColumn}}
\index{pinColumn@{pinColumn}!Cloth@{Cloth}}
\subsubsection[{pinColumn}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::pinColumn (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-toBePinned, }
\item[{const int}]{\_\-column}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_af5c6cdf8ec2507786972cfc88463dcf4}


pin a specific column 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-toBePinned} & toggle of the pin state \\
\hline
\mbox{\tt in}  & {\em \_\-column} & column to pin \\
\hline
\end{DoxyParams}


Definition at line 1062 of file Cloth.cpp.



References Particle::setMoveable().


\begin{DoxyCode}
{
    Particle* currentParticle = 0;
    for (int i = 0; i < m_verticalParticleCount; i++)
    {
        //get id from col indices
        int id = getIdFromCoordinates(i, _column);

        //get particles in that row
        currentParticle = (*m_particleList)[id];

        //set pin info
        currentParticle->setMoveable(!_toBePinned);
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=318pt]{class_cloth_af5c6cdf8ec2507786972cfc88463dcf4_cgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a79b2f7ba3cede040bc489cba434c5676}{
\index{Cloth@{Cloth}!pinColumn@{pinColumn}}
\index{pinColumn@{pinColumn}!Cloth@{Cloth}}
\subsubsection[{pinColumn}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::pinColumn (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-toBePinned}
\end{DoxyParamCaption}
)}}
\label{class_cloth_a79b2f7ba3cede040bc489cba434c5676}


toggle the pin value for a column 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-toBePinned} & the pin toggle value \\
\hline
\end{DoxyParams}


Definition at line 1049 of file Cloth.cpp.



References Particle::getId(), getZXCoordinatesFromId(), and m\_\-internalTraceParticleId.


\begin{DoxyCode}
{
    //get trace particle
    Particle* tracedParticle = (*m_particleList)[m_internalTraceParticleId];

    //get z,x coordinates from particle.id
    int z = 0; int x = 0;
    getZXCoordinatesFromId(tracedParticle->getId(), z, x);

    pinColumn(_toBePinned, x);
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=360pt]{class_cloth_a79b2f7ba3cede040bc489cba434c5676_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a79b2f7ba3cede040bc489cba434c5676_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a46f4219c81133373ebd5a5da150858e2}{
\index{Cloth@{Cloth}!pinInternalTraceParticle@{pinInternalTraceParticle}}
\index{pinInternalTraceParticle@{pinInternalTraceParticle}!Cloth@{Cloth}}
\subsubsection[{pinInternalTraceParticle}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::pinInternalTraceParticle (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-toBePinned}
\end{DoxyParamCaption}
)}}
\label{class_cloth_a46f4219c81133373ebd5a5da150858e2}


toggle pin detail for the current particle being traced 



Definition at line 1000 of file Cloth.cpp.



References m\_\-internalTraceParticleId, and Particle::setMoveable().


\begin{DoxyCode}
{
    Particle* tracedParticle = (*m_particleList)[m_internalTraceParticleId];
    tracedParticle->setMoveable(!_toBePinned);
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=372pt]{class_cloth_a46f4219c81133373ebd5a5da150858e2_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a46f4219c81133373ebd5a5da150858e2_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a0771263f8ade2d40fd15668223c2d873}{
\index{Cloth@{Cloth}!pinRow@{pinRow}}
\index{pinRow@{pinRow}!Cloth@{Cloth}}
\subsubsection[{pinRow}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::pinRow (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-toBePinned, }
\item[{const int}]{\_\-row}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a0771263f8ade2d40fd15668223c2d873}


pin a specific row 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-toBePinned} & toggle of the pin state \\
\hline
\mbox{\tt in}  & {\em \_\-row} & row to pin \\
\hline
\end{DoxyParams}


Definition at line 1030 of file Cloth.cpp.



References Particle::setMoveable().


\begin{DoxyCode}
{
    Particle* currentParticle = 0;
    for (int i = 0; i < m_horizontalParticleCount; i++)
    {
        //get id from row indices
        int id = getIdFromCoordinates(_row, i);

        //get particles in that row
        currentParticle = (*m_particleList)[id];

        //set pin info
        currentParticle->setMoveable(!_toBePinned);
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=304pt]{class_cloth_a0771263f8ade2d40fd15668223c2d873_cgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a0a0b122e8318de0c3081b91b77fb649d}{
\index{Cloth@{Cloth}!pinRow@{pinRow}}
\index{pinRow@{pinRow}!Cloth@{Cloth}}
\subsubsection[{pinRow}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::pinRow (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-toBePinned}
\end{DoxyParamCaption}
)}}
\label{class_cloth_a0a0b122e8318de0c3081b91b77fb649d}


toggle the pin value for a row 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-toBePinned} & the pin toggle value \\
\hline
\end{DoxyParams}


Definition at line 1017 of file Cloth.cpp.



References Particle::getId(), getZXCoordinatesFromId(), and m\_\-internalTraceParticleId.


\begin{DoxyCode}
{
    //get trace particle
    Particle* tracedParticle = (*m_particleList)[m_internalTraceParticleId];

    //get z,x coordinates from particle.id
    int z = 0; int x = 0;
    getZXCoordinatesFromId(tracedParticle->getId(), z, x);

    pinRow(_toBePinned, z);
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=346pt]{class_cloth_a0a0b122e8318de0c3081b91b77fb649d_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a0a0b122e8318de0c3081b91b77fb649d_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a27d2f7d8d45c4e490bf7f44570061097}{
\index{Cloth@{Cloth}!positionParticles@{positionParticles}}
\index{positionParticles@{positionParticles}!Cloth@{Cloth}}
\subsubsection[{positionParticles}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::positionParticles (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-isHorizontal = {\ttfamily true}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a27d2f7d8d45c4e490bf7f44570061097}


position particles in space 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-isHorizontal} & the default orientation of the cloth \\
\hline
\end{DoxyParams}


Definition at line 291 of file Cloth.cpp.



References getIdFromCoordinates(), Particle::getInitialPosition(), m\_\-height, m\_\-horizontalParticleCount, m\_\-initialClothHeight, m\_\-verticalParticleCount, m\_\-width, m\_\-xStep, m\_\-zStep, Particle::setInitialPosition(), and Particle::setPosition().


\begin{DoxyCode}
{
    //position particles to fill in the 2d space
    m_xStep = (m_horizontalParticleCount - 1) == 0 ? 0 : (float)m_width / (float)
      (m_horizontalParticleCount - 1);
    m_zStep = (m_verticalParticleCount - 1) == 0 ? 0 : (float)m_height / (float)(
      m_verticalParticleCount - 1);

    float xStartPos = m_xStep == 0 ? 0 : (float)m_width / 2.0;
    float zStartPos = m_zStep == 0 ? 0 : (float)m_height / 2.0;

    for (int z = 0; z < m_verticalParticleCount; z++)
    {
        for (int x = 0; x < m_horizontalParticleCount; x++)
        {
            //determine id of current particle
            int id = getIdFromCoordinates(z, x);

            //get particle from list
            Particle* p = (*m_particleList)[id];

            //set position of particle
            if (_isHorizontal)
                p->setInitialPosition(ngl::Vector(xStartPos - (x * m_xStep), 
      m_initialClothHeight, zStartPos - (z * m_zStep)));
            else
                p->setInitialPosition(ngl::Vector(xStartPos - (x * m_xStep), (
      m_initialClothHeight/2) + (zStartPos - (z * m_zStep)), zStartPos));

            p->setPosition(p->getInitialPosition());
        }
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=374pt]{class_cloth_a27d2f7d8d45c4e490bf7f44570061097_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=398pt]{class_cloth_a27d2f7d8d45c4e490bf7f44570061097_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_aa79c3d12a42cea0b379fbc0f477bcd77}{
\index{Cloth@{Cloth}!refreshParticleNeighbours@{refreshParticleNeighbours}}
\index{refreshParticleNeighbours@{refreshParticleNeighbours}!Cloth@{Cloth}}
\subsubsection[{refreshParticleNeighbours}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::refreshParticleNeighbours (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_aa79c3d12a42cea0b379fbc0f477bcd77}


refresh and update the neighbours of particles 



Definition at line 426 of file Cloth.cpp.



References Spring::getEndNode(), Particle::getId(), Particle::getNeighbourList(), Spring::getRestLength(), Spring::getRootNode(), Spring::getSpringType(), and m\_\-springList.


\begin{DoxyCode}
{
    for (int i = 0; i < m_springList->size(); i++)
    {
        //get current spring
        Spring* currentSpring = (*m_springList)[i];

        //clone forward spring
        Spring* forward = new Spring(currentSpring->getRootNode(), currentSpring-
      >getEndNode(), currentSpring->getRestLength(), currentSpring->getSpringType());

        //add to neighbour list
        Particle* rootParticle = (*m_particleList)[currentSpring->getRootNode()->
      getId()];
        rootParticle->getNeighbourList()->push_back(forward);

        //create backward spring
        Spring* backward = new Spring(currentSpring->getEndNode(), currentSpring-
      >getRootNode(), currentSpring->getRestLength(), currentSpring->getSpringType());

        //add to neighbour list
        Particle* endParticle = (*m_particleList)[currentSpring->getEndNode()->
      getId()];
        endParticle->getNeighbourList()->push_back(backward);
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_aa79c3d12a42cea0b379fbc0f477bcd77_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_aa79c3d12a42cea0b379fbc0f477bcd77_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ace9b404deea1db954a14c3c8e889bb02}{
\index{Cloth@{Cloth}!reInitialiseParticles@{reInitialiseParticles}}
\index{reInitialiseParticles@{reInitialiseParticles}!Cloth@{Cloth}}
\subsubsection[{reInitialiseParticles}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::reInitialiseParticles (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-height, }
\item[{const int}]{\_\-width, }
\item[{const int}]{\_\-verticalParticleCount, }
\item[{const int}]{\_\-horizontalParticleCount, }
\item[{const float}]{\_\-timestep, }
\item[{const {\bf IntegrationType}}]{\_\-integrationType, }
\item[{const {\bf ConstrainedScenario}}]{\_\-scenario}
\end{DoxyParamCaption}
)}}
\label{class_cloth_ace9b404deea1db954a14c3c8e889bb02}


re initialise cloth to its default one with the current parameters and a specific scenario 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-height} & new height of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-width} & new width of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-verticalParticleCount} & the modified number of particles in the vertical direction of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-horizontalParticleCount} & the modified number of particles in the horizontal direction of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-timestep} & the modified timestep of simulation \\
\hline
\mbox{\tt in}  & {\em \_\-integrationType} & the new integration method \\
\hline
\mbox{\tt in}  & {\em \_\-scenario} & the simulation scenario to apply next \\
\hline
\end{DoxyParams}


Definition at line 99 of file Cloth.cpp.


\begin{DoxyCode}
{
    //update scenario
    m_scenario = _scenario;

    //calls normal reinit routine
    reInitialiseParticles(_height, _width, _verticalParticleCount, _horizontalPar
      ticleCount, _timestep, _integrationType);
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ace9b404deea1db954a14c3c8e889bb02_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_aaeb6be5d4f79ac01778a6c835f0b9044}{
\index{Cloth@{Cloth}!reInitialiseParticles@{reInitialiseParticles}}
\index{reInitialiseParticles@{reInitialiseParticles}!Cloth@{Cloth}}
\subsubsection[{reInitialiseParticles}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::reInitialiseParticles (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-height, }
\item[{const int}]{\_\-width, }
\item[{const int}]{\_\-verticalParticleCount, }
\item[{const int}]{\_\-horizontalParticleCount, }
\item[{const float}]{\_\-timestep, }
\item[{const {\bf IntegrationType}}]{\_\-integrationType}
\end{DoxyParamCaption}
)}}
\label{class_cloth_aaeb6be5d4f79ac01778a6c835f0b9044}


re initialise cloth to its default one with the current parameters, keeping the current scenario 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-height} & new height of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-width} & new width of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-verticalParticleCount} & the modified number of particles in the vertical direction of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-horizontalParticleCount} & the modified number of particles in the horizontal direction of the cloth \\
\hline
\mbox{\tt in}  & {\em \_\-timestep} & the modified timestep of simulation \\
\hline
\mbox{\tt in}  & {\em \_\-integrationType} & the new integration method \\
\hline
\end{DoxyParams}


Definition at line 118 of file Cloth.cpp.


\begin{DoxyCode}
{
    //delete all particles
    deleteParticles();

    //reinitialise particles
    initialise(_height, _width, _verticalParticleCount, _horizontalParticleCount,
       _timestep, _integrationType);
}
\end{DoxyCode}
\hypertarget{class_cloth_ab12118f7a9b3c4189ba3de27c2f71b47}{
\index{Cloth@{Cloth}!setCurrentClothMaterial@{setCurrentClothMaterial}}
\index{setCurrentClothMaterial@{setCurrentClothMaterial}!Cloth@{Cloth}}
\subsubsection[{setCurrentClothMaterial}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setCurrentClothMaterial (
\begin{DoxyParamCaption}
\item[{const std::string}]{\_\-name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_ab12118f7a9b3c4189ba3de27c2f71b47}


sets the material for the current cloth 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-name} & the material selected \\
\hline
\end{DoxyParams}


Definition at line 186 of file Cloth.h.



References getClothMaterialByName(), m\_\-currentClothMaterial, m\_\-currentClothMaterialIndex, m\_\-damping, and m\_\-stiffness.


\begin{DoxyCode}
    {
        m_currentClothMaterial = getClothMaterialByName(_name, 
      m_currentClothMaterialIndex, m_stiffness, m_damping);
    }
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ab12118f7a9b3c4189ba3de27c2f71b47_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ab12118f7a9b3c4189ba3de27c2f71b47_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a7a8cf6f20d72be953e3223a9424f6c76}{
\index{Cloth@{Cloth}!setDamping@{setDamping}}
\index{setDamping@{setDamping}!Cloth@{Cloth}}
\subsubsection[{setDamping}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setDamping (
\begin{DoxyParamCaption}
\item[{const float}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a7a8cf6f20d72be953e3223a9424f6c76}


sets the damping for the cloth material 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the damping coefficient \\
\hline
\end{DoxyParams}


Definition at line 212 of file Cloth.h.



References m\_\-damping.


\begin{DoxyCode}
{ m_damping = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a7a8cf6f20d72be953e3223a9424f6c76_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ac9c39c52a43332e62fa3d856650951b4}{
\index{Cloth@{Cloth}!setDrawWireframe@{setDrawWireframe}}
\index{setDrawWireframe@{setDrawWireframe}!Cloth@{Cloth}}
\subsubsection[{setDrawWireframe}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setDrawWireframe (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_ac9c39c52a43332e62fa3d856650951b4}


sets the flag for wireframe toggle for drawing 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-value} & the wireframe toggle flag \\
\hline
\end{DoxyParams}


Definition at line 182 of file Cloth.h.



References m\_\-drawWireframe.


\begin{DoxyCode}
{ m_drawWireframe = _value; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ac9c39c52a43332e62fa3d856650951b4_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a606669ddb6a5ebf7e1d7219b27d1f6d3}{
\index{Cloth@{Cloth}!setEnableGravity@{setEnableGravity}}
\index{setEnableGravity@{setEnableGravity}!Cloth@{Cloth}}
\subsubsection[{setEnableGravity}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setEnableGravity (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a606669ddb6a5ebf7e1d7219b27d1f6d3}


sets the toggle for gravity force 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the gravity toggle flag value \\
\hline
\end{DoxyParams}


Definition at line 237 of file Cloth.h.



References m\_\-enableGravity.


\begin{DoxyCode}
{ m_enableGravity = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a606669ddb6a5ebf7e1d7219b27d1f6d3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ad07056b0caddff0e5832780868d3fe1f}{
\index{Cloth@{Cloth}!setEnableHookeBend@{setEnableHookeBend}}
\index{setEnableHookeBend@{setEnableHookeBend}!Cloth@{Cloth}}
\subsubsection[{setEnableHookeBend}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setEnableHookeBend (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_ad07056b0caddff0e5832780868d3fe1f}


sets the toggle for bend spring of the simulation 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the bend toggle value \\
\hline
\end{DoxyParams}


Definition at line 279 of file Cloth.h.



References m\_\-enableHookeBend.


\begin{DoxyCode}
{ m_enableHookeBend = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ad07056b0caddff0e5832780868d3fe1f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a2e3d9169d09c47244dbefb39ac96a040}{
\index{Cloth@{Cloth}!setEnableHookeStretch@{setEnableHookeStretch}}
\index{setEnableHookeStretch@{setEnableHookeStretch}!Cloth@{Cloth}}
\subsubsection[{setEnableHookeStretch}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setEnableHookeStretch (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a2e3d9169d09c47244dbefb39ac96a040}


sets the toggle for stretch spring of the simulation 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the stretch toggle value \\
\hline
\end{DoxyParams}


Definition at line 272 of file Cloth.h.



References m\_\-enableHookeStretch.


\begin{DoxyCode}
{ m_enableHookeStretch = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a2e3d9169d09c47244dbefb39ac96a040_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_acf80d4429b37754492852ea912d90061}{
\index{Cloth@{Cloth}!setEnableHookeStructural@{setEnableHookeStructural}}
\index{setEnableHookeStructural@{setEnableHookeStructural}!Cloth@{Cloth}}
\subsubsection[{setEnableHookeStructural}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setEnableHookeStructural (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_acf80d4429b37754492852ea912d90061}


sets the toggle for structural spring of the simulation 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the structural toggle value \\
\hline
\end{DoxyParams}


Definition at line 265 of file Cloth.h.



References m\_\-enableHookeStructural.


\begin{DoxyCode}
{ m_enableHookeStructural = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_acf80d4429b37754492852ea912d90061_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a2a8fb817f7946a0916dabae85859596a}{
\index{Cloth@{Cloth}!setEnableInternalTrace@{setEnableInternalTrace}}
\index{setEnableInternalTrace@{setEnableInternalTrace}!Cloth@{Cloth}}
\subsubsection[{setEnableInternalTrace}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setEnableInternalTrace (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-state}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a2a8fb817f7946a0916dabae85859596a}


sets whether internal trace is enabled 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-state} & flag to indicate whether trace is enabled; \\
\hline
\end{DoxyParams}


Definition at line 125 of file Cloth.h.



References m\_\-enableInternalTrace.


\begin{DoxyCode}
{ m_enableInternalTrace = _state; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a2a8fb817f7946a0916dabae85859596a_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a606b9270b2b38e817a332a9e0db8943d}{
\index{Cloth@{Cloth}!setEnableInternalTraceNeighbours@{setEnableInternalTraceNeighbours}}
\index{setEnableInternalTraceNeighbours@{setEnableInternalTraceNeighbours}!Cloth@{Cloth}}
\subsubsection[{setEnableInternalTraceNeighbours}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setEnableInternalTraceNeighbours (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-state}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a606b9270b2b38e817a332a9e0db8943d}


sets whether internal trace with neighbours is enabled 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-state} & flag to indicate whether trace is enabled; \\
\hline
\end{DoxyParams}


Definition at line 132 of file Cloth.h.



References m\_\-enableInternalTraceNeighbours.


\begin{DoxyCode}
{ m_enableInternalTraceNeighbours = _state; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a606b9270b2b38e817a332a9e0db8943d_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a4b9384b741ca861a37a1c945037facab}{
\index{Cloth@{Cloth}!setEnableWind@{setEnableWind}}
\index{setEnableWind@{setEnableWind}!Cloth@{Cloth}}
\subsubsection[{setEnableWind}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setEnableWind (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a4b9384b741ca861a37a1c945037facab}


sets the toggle for wind force 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the wind toggle flag value \\
\hline
\end{DoxyParams}


Definition at line 244 of file Cloth.h.



References m\_\-windEnabled.


\begin{DoxyCode}
{ m_windEnabled = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=390pt]{class_cloth_a4b9384b741ca861a37a1c945037facab_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a46d5fcadfe3fa3148061bf85082b5fd5}{
\index{Cloth@{Cloth}!setHeight@{setHeight}}
\index{setHeight@{setHeight}!Cloth@{Cloth}}
\subsubsection[{setHeight}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setHeight (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a46d5fcadfe3fa3148061bf85082b5fd5}


sets the height of the cloth 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the height \\
\hline
\end{DoxyParams}


Definition at line 216 of file Cloth.h.



References m\_\-height.


\begin{DoxyCode}
{ m_height = _v; }
\end{DoxyCode}
\hypertarget{class_cloth_a312055504c71ec2fd4e1ced3ddf898bc}{
\index{Cloth@{Cloth}!setHorizontalParticleCount@{setHorizontalParticleCount}}
\index{setHorizontalParticleCount@{setHorizontalParticleCount}!Cloth@{Cloth}}
\subsubsection[{setHorizontalParticleCount}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setHorizontalParticleCount (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-count}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a312055504c71ec2fd4e1ced3ddf898bc}


sets the number of horizontal particles 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-count} & the count of horizontal particles \\
\hline
\end{DoxyParams}


Definition at line 159 of file Cloth.h.



References m\_\-horizontalParticleCount.


\begin{DoxyCode}
{ m_horizontalParticleCount = _count; }
\end{DoxyCode}
\hypertarget{class_cloth_a2ad6e78c1c74e36483589d72cadee215}{
\index{Cloth@{Cloth}!setIntegrationType@{setIntegrationType}}
\index{setIntegrationType@{setIntegrationType}!Cloth@{Cloth}}
\subsubsection[{setIntegrationType}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setIntegrationType (
\begin{DoxyParamCaption}
\item[{const {\bf IntegrationType}}]{\_\-type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a2ad6e78c1c74e36483589d72cadee215}


sets the integration method used for the simulation update 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-type} & the integration type \\
\hline
\end{DoxyParams}


Definition at line 175 of file Cloth.h.



References m\_\-integrationType.


\begin{DoxyCode}
{ m_integrationType = _type; }
\end{DoxyCode}
\hypertarget{class_cloth_add5b73a403b34cd15702192c9d74798e}{
\index{Cloth@{Cloth}!setInternalTraceParticleId@{setInternalTraceParticleId}}
\index{setInternalTraceParticleId@{setInternalTraceParticleId}!Cloth@{Cloth}}
\subsubsection[{setInternalTraceParticleId}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setInternalTraceParticleId (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-val}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_add5b73a403b34cd15702192c9d74798e}


sets the id of the particle under internal tracing 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-val} & the particle id that will currently be traced \\
\hline
\end{DoxyParams}


Definition at line 139 of file Cloth.h.



References m\_\-internalTraceParticleId.


\begin{DoxyCode}
{ m_internalTraceParticleId = _val; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_add5b73a403b34cd15702192c9d74798e_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_ab45e02358103313a23cc4a63b10ce2db}{
\index{Cloth@{Cloth}!setStiffness@{setStiffness}}
\index{setStiffness@{setStiffness}!Cloth@{Cloth}}
\subsubsection[{setStiffness}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setStiffness (
\begin{DoxyParamCaption}
\item[{const float}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_ab45e02358103313a23cc4a63b10ce2db}


sets the stiffness for the cloth material 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the stiffness value \\
\hline
\end{DoxyParams}


Definition at line 205 of file Cloth.h.



References m\_\-stiffness.


\begin{DoxyCode}
{ m_stiffness = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_ab45e02358103313a23cc4a63b10ce2db_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a5a6b49a964b91b580872a8a0ae421eb4}{
\index{Cloth@{Cloth}!setTimestep@{setTimestep}}
\index{setTimestep@{setTimestep}!Cloth@{Cloth}}
\subsubsection[{setTimestep}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setTimestep (
\begin{DoxyParamCaption}
\item[{const float}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a5a6b49a964b91b580872a8a0ae421eb4}


sets the timestep of the cloth simulation 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the timestep \\
\hline
\end{DoxyParams}


Definition at line 230 of file Cloth.h.



References m\_\-timestep.


\begin{DoxyCode}
{ m_timestep = _v; }
\end{DoxyCode}
\hypertarget{class_cloth_a7a2d1d8eb99c15051317ce9bfb9cbf23}{
\index{Cloth@{Cloth}!setupQuadsForSolidDrawing@{setupQuadsForSolidDrawing}}
\index{setupQuadsForSolidDrawing@{setupQuadsForSolidDrawing}!Cloth@{Cloth}}
\subsubsection[{setupQuadsForSolidDrawing}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setupQuadsForSolidDrawing (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a7a2d1d8eb99c15051317ce9bfb9cbf23}


setup the particles in quads for drawing later on 



Definition at line 233 of file Cloth.cpp.



References Particle::getId(), getZXCoordinatesFromId(), m\_\-horizontalParticleCount, m\_\-particleInQuadList, m\_\-particleList, m\_\-particleQuadPositionList, m\_\-textureCoords, and m\_\-verticalParticleCount.


\begin{DoxyCode}
{
    //calculate starting index of last row (cannot apply quad calculation there!)
      
    int lastRowStartIndex = m_horizontalParticleCount * (m_verticalParticleCount 
      - 1);

    //add quad particles to the vextex array
    for (int i = 0; i < m_particleList->size(); i++)
    {
        if ((i % m_horizontalParticleCount) == 0)
        {
            //we are on the left side -> skip
            continue;
        }

        if (i >= lastRowStartIndex)
        {
            //we are on the last row -> skip
            continue;
        }

        //safe to add particles
        m_particleInQuadList->push_back((*m_particleList)[i]);
        m_particleInQuadList->push_back((*m_particleList)[i - 1]);
        m_particleInQuadList->push_back((*m_particleList)[(i - 1) + m_horizontalP
      articleCount]);
        m_particleInQuadList->push_back((*m_particleList)[i + m_horizontalParticl
      eCount]);

        //add an empty placeholder to the quadposition list
        m_particleQuadPositionList.push_back(ngl::Vector(0, 0, 0));
        m_particleQuadPositionList.push_back(ngl::Vector(0, 0, 0));
        m_particleQuadPositionList.push_back(ngl::Vector(0, 0, 0));
        m_particleQuadPositionList.push_back(ngl::Vector(0, 0, 0));
    }

    //setup texture coordinates for quads
    Particle* currentParticle = 0;
    for (int i = 0; i < m_particleInQuadList->size(); i++)
    {
        //get particle
        currentParticle = (*m_particleInQuadList)[i];

        //get id
        int id = currentParticle->getId();

        //derive (z, x) from id
        int z = 0; int x = 0;
        getZXCoordinatesFromId(id, z, x);

        //fit z in unit vertical space
        float zt = (float)z / (float)(m_verticalParticleCount - 1);

        //fit x in unit horizontal space
        float xt = (float)x / (float)(m_horizontalParticleCount - 1);

        //add coordinates to texturecoord list
        m_textureCoords.push_back(zt); m_textureCoords.push_back(xt);
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a7a2d1d8eb99c15051317ce9bfb9cbf23_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a7a2d1d8eb99c15051317ce9bfb9cbf23_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a5a3271083f8c60c80a3044f95ec6ae0a}{
\index{Cloth@{Cloth}!setVerticalParticleCount@{setVerticalParticleCount}}
\index{setVerticalParticleCount@{setVerticalParticleCount}!Cloth@{Cloth}}
\subsubsection[{setVerticalParticleCount}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setVerticalParticleCount (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-count}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a5a3271083f8c60c80a3044f95ec6ae0a}


sets the number of vertical particles 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-count} & the count of vertical particles \\
\hline
\end{DoxyParams}


Definition at line 152 of file Cloth.h.



References m\_\-verticalParticleCount.


\begin{DoxyCode}
{ m_verticalParticleCount = _count; }
\end{DoxyCode}
\hypertarget{class_cloth_a92cb09d7554e38437b52514d98260a40}{
\index{Cloth@{Cloth}!setWidth@{setWidth}}
\index{setWidth@{setWidth}!Cloth@{Cloth}}
\subsubsection[{setWidth}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setWidth (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a92cb09d7554e38437b52514d98260a40}


sets the width of the cloth 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the width \\
\hline
\end{DoxyParams}


Definition at line 223 of file Cloth.h.



References m\_\-width.


\begin{DoxyCode}
{ m_width = _v; }
\end{DoxyCode}
\hypertarget{class_cloth_a32d856e47b5fe3c989ba0eb7d320688e}{
\index{Cloth@{Cloth}!setWindDirection@{setWindDirection}}
\index{setWindDirection@{setWindDirection}!Cloth@{Cloth}}
\subsubsection[{setWindDirection}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setWindDirection (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a32d856e47b5fe3c989ba0eb7d320688e}


sets the wind direction 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the direction \\
\hline
\end{DoxyParams}


Definition at line 261 of file Cloth.h.



References m\_\-windDirection.


\begin{DoxyCode}
{ m_windDirection = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a32d856e47b5fe3c989ba0eb7d320688e_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a651a9547682278457282e810af5e5c74}{
\index{Cloth@{Cloth}!setWindStrength@{setWindStrength}}
\index{setWindStrength@{setWindStrength}!Cloth@{Cloth}}
\subsubsection[{setWindStrength}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::setWindStrength (
\begin{DoxyParamCaption}
\item[{const float}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a651a9547682278457282e810af5e5c74}


sets the wind strength 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the strength \\
\hline
\end{DoxyParams}


Definition at line 254 of file Cloth.h.



References m\_\-windStrength.


\begin{DoxyCode}
{ m_windStrength = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a651a9547682278457282e810af5e5c74_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a5c0e789a45edf72edb454da9a674b62c}{
\index{Cloth@{Cloth}!toggleEnableAutoCloth@{toggleEnableAutoCloth}}
\index{toggleEnableAutoCloth@{toggleEnableAutoCloth}!Cloth@{Cloth}}
\subsubsection[{toggleEnableAutoCloth}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::toggleEnableAutoCloth (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_cloth_a5c0e789a45edf72edb454da9a674b62c}


toggles the state of the automatic cloth movement flag 



Definition at line 168 of file Cloth.h.



References m\_\-enableAutoCloth.


\begin{DoxyCode}
{ m_enableAutoCloth ^= true; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a5c0e789a45edf72edb454da9a674b62c_icgraph}
\end{center}
\end{figure}


\hypertarget{class_cloth_a7c4ea595a392cc6c6e46de523523bb8e}{
\index{Cloth@{Cloth}!updateParticles@{updateParticles}}
\index{updateParticles@{updateParticles}!Cloth@{Cloth}}
\subsubsection[{updateParticles}]{\setlength{\rightskip}{0pt plus 5cm}void Cloth::updateParticles (
\begin{DoxyParamCaption}
\item[{{\bf ObstacleManager} $\ast$}]{\_\-obstacleManager}
\end{DoxyParamCaption}
)}}
\label{class_cloth_a7c4ea595a392cc6c6e46de523523bb8e}


update the position of particles at each timestep interval 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-obstacleManager} & the obstacle manager that holds the list of obstacles \\
\hline
\end{DoxyParams}


Definition at line 676 of file Cloth.cpp.



References evaluateNetForces(), Particle::getMoveable(), integrateBackward(), integrateNext(), isCollisionDetected(), and m\_\-particleList.


\begin{DoxyCode}
{
    //evaluate net forces on each particle
    evaluateNetForces();

    //loop over the list of particles
    Particle* currentParticle = 0;
    for (int i = 0; i < m_particleList->size(); i++)
    {
        currentParticle = (*m_particleList)[i];

        if (currentParticle->getMoveable())
        {
            //determine next (position, velocity) of particle
            integrateNext(currentParticle);

            //check and resolve collision
            ngl::Vector newPosition = 0;
            if (isCollisionDetected(_obstacleManager, currentParticle, newPositio
      n))
            {
                //readjust (position, velocity) of particle wrt to corrective new
       positive
                integrateBackward(currentParticle, newPosition);
            }
        }
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a7c4ea595a392cc6c6e46de523523bb8e_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_cloth_a7c4ea595a392cc6c6e46de523523bb8e_icgraph}
\end{center}
\end{figure}




\subsection{Member Data Documentation}
\hypertarget{class_cloth_add2a30526aa0d960777b2c703e045bbe}{
\index{Cloth@{Cloth}!m\_\-clothMaterialList@{m\_\-clothMaterialList}}
\index{m\_\-clothMaterialList@{m\_\-clothMaterialList}!Cloth@{Cloth}}
\subsubsection[{m\_\-clothMaterialList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf ClothMaterial}$\ast$$>$$\ast$ {\bf Cloth::m\_\-clothMaterialList}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_add2a30526aa0d960777b2c703e045bbe}


the list of cloth materials 



Definition at line 427 of file Cloth.h.

\hypertarget{class_cloth_a1451431eb37bf4b9a2c9b9a3ef23eea5}{
\index{Cloth@{Cloth}!m\_\-currentClothMaterial@{m\_\-currentClothMaterial}}
\index{m\_\-currentClothMaterial@{m\_\-currentClothMaterial}!Cloth@{Cloth}}
\subsubsection[{m\_\-currentClothMaterial}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ClothMaterial}$\ast$ {\bf Cloth::m\_\-currentClothMaterial}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a1451431eb37bf4b9a2c9b9a3ef23eea5}


the currently selected cloth material 



Definition at line 430 of file Cloth.h.

\hypertarget{class_cloth_a753699ec667bf4160828303e178b7bf4}{
\index{Cloth@{Cloth}!m\_\-currentClothMaterialIndex@{m\_\-currentClothMaterialIndex}}
\index{m\_\-currentClothMaterialIndex@{m\_\-currentClothMaterialIndex}!Cloth@{Cloth}}
\subsubsection[{m\_\-currentClothMaterialIndex}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-currentClothMaterialIndex}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a753699ec667bf4160828303e178b7bf4}


the index of the currently selected cloth material 



Definition at line 433 of file Cloth.h.

\hypertarget{class_cloth_a3e1811ffca75b2125835866d59afa85e}{
\index{Cloth@{Cloth}!m\_\-damping@{m\_\-damping}}
\index{m\_\-damping@{m\_\-damping}!Cloth@{Cloth}}
\subsubsection[{m\_\-damping}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-damping}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a3e1811ffca75b2125835866d59afa85e}


the damping coefficient of the cloth 



Definition at line 355 of file Cloth.h.

\hypertarget{class_cloth_a39cdd63d4c34d20d1dd20af93db39ae2}{
\index{Cloth@{Cloth}!m\_\-drawWireframe@{m\_\-drawWireframe}}
\index{m\_\-drawWireframe@{m\_\-drawWireframe}!Cloth@{Cloth}}
\subsubsection[{m\_\-drawWireframe}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Cloth::m\_\-drawWireframe}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a39cdd63d4c34d20d1dd20af93db39ae2}


flag to toggle wireframe mode 



Definition at line 322 of file Cloth.h.

\hypertarget{class_cloth_a47edaa2a2106931fafa44a239b0e2e9f}{
\index{Cloth@{Cloth}!m\_\-enableAutoCloth@{m\_\-enableAutoCloth}}
\index{m\_\-enableAutoCloth@{m\_\-enableAutoCloth}!Cloth@{Cloth}}
\subsubsection[{m\_\-enableAutoCloth}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Cloth::m\_\-enableAutoCloth}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a47edaa2a2106931fafa44a239b0e2e9f}


flag to control automatic movement of the cloth 



Definition at line 394 of file Cloth.h.

\hypertarget{class_cloth_a95ed2b74380bface428a4f8681414a33}{
\index{Cloth@{Cloth}!m\_\-enableGravity@{m\_\-enableGravity}}
\index{m\_\-enableGravity@{m\_\-enableGravity}!Cloth@{Cloth}}
\subsubsection[{m\_\-enableGravity}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Cloth::m\_\-enableGravity}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a95ed2b74380bface428a4f8681414a33}


the toggle for gravity 



Definition at line 358 of file Cloth.h.

\hypertarget{class_cloth_a40f31567cce250c0dcc4fa6794a71677}{
\index{Cloth@{Cloth}!m\_\-enableHookeBend@{m\_\-enableHookeBend}}
\index{m\_\-enableHookeBend@{m\_\-enableHookeBend}!Cloth@{Cloth}}
\subsubsection[{m\_\-enableHookeBend}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Cloth::m\_\-enableHookeBend}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a40f31567cce250c0dcc4fa6794a71677}


the toggle for bend springs 



Definition at line 376 of file Cloth.h.

\hypertarget{class_cloth_ac8d8cf28c6eaca9cae14945d7d409937}{
\index{Cloth@{Cloth}!m\_\-enableHookeStretch@{m\_\-enableHookeStretch}}
\index{m\_\-enableHookeStretch@{m\_\-enableHookeStretch}!Cloth@{Cloth}}
\subsubsection[{m\_\-enableHookeStretch}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Cloth::m\_\-enableHookeStretch}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_ac8d8cf28c6eaca9cae14945d7d409937}


the toggle for stretch springs 



Definition at line 373 of file Cloth.h.

\hypertarget{class_cloth_a1cf9b55203f28d36734a3aefba2c4943}{
\index{Cloth@{Cloth}!m\_\-enableHookeStructural@{m\_\-enableHookeStructural}}
\index{m\_\-enableHookeStructural@{m\_\-enableHookeStructural}!Cloth@{Cloth}}
\subsubsection[{m\_\-enableHookeStructural}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Cloth::m\_\-enableHookeStructural}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a1cf9b55203f28d36734a3aefba2c4943}


the toggle for structural springs 



Definition at line 370 of file Cloth.h.

\hypertarget{class_cloth_a15277d242052d2bfb13d65216d58cc6b}{
\index{Cloth@{Cloth}!m\_\-enableInternalTrace@{m\_\-enableInternalTrace}}
\index{m\_\-enableInternalTrace@{m\_\-enableInternalTrace}!Cloth@{Cloth}}
\subsubsection[{m\_\-enableInternalTrace}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Cloth::m\_\-enableInternalTrace}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a15277d242052d2bfb13d65216d58cc6b}


flag to determine if we are tracing a particle 



Definition at line 385 of file Cloth.h.

\hypertarget{class_cloth_aebb3c928f10ca1b42909b40619a8230e}{
\index{Cloth@{Cloth}!m\_\-enableInternalTraceNeighbours@{m\_\-enableInternalTraceNeighbours}}
\index{m\_\-enableInternalTraceNeighbours@{m\_\-enableInternalTraceNeighbours}!Cloth@{Cloth}}
\subsubsection[{m\_\-enableInternalTraceNeighbours}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Cloth::m\_\-enableInternalTraceNeighbours}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_aebb3c928f10ca1b42909b40619a8230e}


flag to determine if we are tracing neighbours 



Definition at line 391 of file Cloth.h.

\hypertarget{class_cloth_abc421c5bf4ec48f390924b263e2dfc5d}{
\index{Cloth@{Cloth}!m\_\-flexHorizontalRestLength@{m\_\-flexHorizontalRestLength}}
\index{m\_\-flexHorizontalRestLength@{m\_\-flexHorizontalRestLength}!Cloth@{Cloth}}
\subsubsection[{m\_\-flexHorizontalRestLength}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-flexHorizontalRestLength}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_abc421c5bf4ec48f390924b263e2dfc5d}


the bend horizontal rest length 



Definition at line 409 of file Cloth.h.

\hypertarget{class_cloth_aed5eeefed9d85268b05acea871f6a639}{
\index{Cloth@{Cloth}!m\_\-flexVerticalRestLength@{m\_\-flexVerticalRestLength}}
\index{m\_\-flexVerticalRestLength@{m\_\-flexVerticalRestLength}!Cloth@{Cloth}}
\subsubsection[{m\_\-flexVerticalRestLength}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-flexVerticalRestLength}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_aed5eeefed9d85268b05acea871f6a639}


the bend horizontal rest length 



Definition at line 412 of file Cloth.h.

\hypertarget{class_cloth_a6a75663870131f8fab352635d8d3bdf7}{
\index{Cloth@{Cloth}!m\_\-height@{m\_\-height}}
\index{m\_\-height@{m\_\-height}!Cloth@{Cloth}}
\subsubsection[{m\_\-height}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-height}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a6a75663870131f8fab352635d8d3bdf7}


the height of cloth 



Definition at line 325 of file Cloth.h.

\hypertarget{class_cloth_a3e922c699471d4a3bd91341b3595c82d}{
\index{Cloth@{Cloth}!m\_\-horizontalParticleCount@{m\_\-horizontalParticleCount}}
\index{m\_\-horizontalParticleCount@{m\_\-horizontalParticleCount}!Cloth@{Cloth}}
\subsubsection[{m\_\-horizontalParticleCount}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-horizontalParticleCount}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a3e922c699471d4a3bd91341b3595c82d}


the horizontal number of particles in the cloth 



Definition at line 334 of file Cloth.h.

\hypertarget{class_cloth_aa4c363e31d209cfb19a380a6082f7979}{
\index{Cloth@{Cloth}!m\_\-initialClothHeight@{m\_\-initialClothHeight}}
\index{m\_\-initialClothHeight@{m\_\-initialClothHeight}!Cloth@{Cloth}}
\subsubsection[{m\_\-initialClothHeight}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-initialClothHeight}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_aa4c363e31d209cfb19a380a6082f7979}


the initial height of the cloth 



Definition at line 319 of file Cloth.h.

\hypertarget{class_cloth_a2046a162c4295d42cbd682c8610c706b}{
\index{Cloth@{Cloth}!m\_\-integrationType@{m\_\-integrationType}}
\index{m\_\-integrationType@{m\_\-integrationType}!Cloth@{Cloth}}
\subsubsection[{m\_\-integrationType}]{\setlength{\rightskip}{0pt plus 5cm}{\bf IntegrationType} {\bf Cloth::m\_\-integrationType}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a2046a162c4295d42cbd682c8610c706b}


integration method used for the simulation 



Definition at line 397 of file Cloth.h.

\hypertarget{class_cloth_a889f1bb60655e0ac5ecdb9cf7ddb585b}{
\index{Cloth@{Cloth}!m\_\-internalTraceParticleId@{m\_\-internalTraceParticleId}}
\index{m\_\-internalTraceParticleId@{m\_\-internalTraceParticleId}!Cloth@{Cloth}}
\subsubsection[{m\_\-internalTraceParticleId}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-internalTraceParticleId}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a889f1bb60655e0ac5ecdb9cf7ddb585b}


the id of the particle that is being traced 



Definition at line 388 of file Cloth.h.

\hypertarget{class_cloth_afb8dac26ecdc205d6f6ad98e1acc0dee}{
\index{Cloth@{Cloth}!m\_\-maxLastRowWeight@{m\_\-maxLastRowWeight}}
\index{m\_\-maxLastRowWeight@{m\_\-maxLastRowWeight}!Cloth@{Cloth}}
\subsubsection[{m\_\-maxLastRowWeight}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-maxLastRowWeight}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_afb8dac26ecdc205d6f6ad98e1acc0dee}


the maximum weight of the last row 



Definition at line 379 of file Cloth.h.

\hypertarget{class_cloth_aa13afb99925b71b856e1c080354430bd}{
\index{Cloth@{Cloth}!m\_\-particleInQuadList@{m\_\-particleInQuadList}}
\index{m\_\-particleInQuadList@{m\_\-particleInQuadList}!Cloth@{Cloth}}
\subsubsection[{m\_\-particleInQuadList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Particle}$\ast$$>$$\ast$ {\bf Cloth::m\_\-particleInQuadList}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_aa13afb99925b71b856e1c080354430bd}


the particles arranged in quad 



Definition at line 304 of file Cloth.h.

\hypertarget{class_cloth_a54d9b579bfc313d90015cbc1a7a17547}{
\index{Cloth@{Cloth}!m\_\-particleList@{m\_\-particleList}}
\index{m\_\-particleList@{m\_\-particleList}!Cloth@{Cloth}}
\subsubsection[{m\_\-particleList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Particle}$\ast$$>$$\ast$ {\bf Cloth::m\_\-particleList}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a54d9b579bfc313d90015cbc1a7a17547}


the masses affecting the cloth simulation 



Definition at line 301 of file Cloth.h.

\hypertarget{class_cloth_a99be52bcaefb13a24d24a38d82e65374}{
\index{Cloth@{Cloth}!m\_\-particleMass@{m\_\-particleMass}}
\index{m\_\-particleMass@{m\_\-particleMass}!Cloth@{Cloth}}
\subsubsection[{m\_\-particleMass}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-particleMass}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a99be52bcaefb13a24d24a38d82e65374}


the particle mass 



Definition at line 343 of file Cloth.h.

\hypertarget{class_cloth_aa0ed767b913eaa0679a4c95771b462aa}{
\index{Cloth@{Cloth}!m\_\-particlePositionList@{m\_\-particlePositionList}}
\index{m\_\-particlePositionList@{m\_\-particlePositionList}!Cloth@{Cloth}}
\subsubsection[{m\_\-particlePositionList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ngl::Vector$>$ {\bf Cloth::m\_\-particlePositionList}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_aa0ed767b913eaa0679a4c95771b462aa}


the positions of the masses used in the vertex array for drawing 



Definition at line 310 of file Cloth.h.

\hypertarget{class_cloth_a8f6d155a0c94ca220f32bb87a1d6401f}{
\index{Cloth@{Cloth}!m\_\-particleQuadPositionList@{m\_\-particleQuadPositionList}}
\index{m\_\-particleQuadPositionList@{m\_\-particleQuadPositionList}!Cloth@{Cloth}}
\subsubsection[{m\_\-particleQuadPositionList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ngl::Vector$>$ {\bf Cloth::m\_\-particleQuadPositionList}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a8f6d155a0c94ca220f32bb87a1d6401f}


the positions of quads of masses used in the vertex array for drawing 



Definition at line 313 of file Cloth.h.

\hypertarget{class_cloth_a46ae54815dd32d088659001975cbbfdf}{
\index{Cloth@{Cloth}!m\_\-particleRadius@{m\_\-particleRadius}}
\index{m\_\-particleRadius@{m\_\-particleRadius}!Cloth@{Cloth}}
\subsubsection[{m\_\-particleRadius}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-particleRadius}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a46ae54815dd32d088659001975cbbfdf}


the particle radius 



Definition at line 346 of file Cloth.h.

\hypertarget{class_cloth_a9db55964f628a0c4b3cb44b8912f52dd}{
\index{Cloth@{Cloth}!m\_\-scenario@{m\_\-scenario}}
\index{m\_\-scenario@{m\_\-scenario}!Cloth@{Cloth}}
\subsubsection[{m\_\-scenario}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ConstrainedScenario} {\bf Cloth::m\_\-scenario}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a9db55964f628a0c4b3cb44b8912f52dd}


the scenario of the simulation 



Definition at line 436 of file Cloth.h.

\hypertarget{class_cloth_aff62df0ea5a75f95d2a51d5f4b1bd486}{
\index{Cloth@{Cloth}!m\_\-shearRestLength@{m\_\-shearRestLength}}
\index{m\_\-shearRestLength@{m\_\-shearRestLength}!Cloth@{Cloth}}
\subsubsection[{m\_\-shearRestLength}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-shearRestLength}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_aff62df0ea5a75f95d2a51d5f4b1bd486}


the shear rest length 



Definition at line 406 of file Cloth.h.

\hypertarget{class_cloth_af449ac46fd5165eeeca9ac833f3c92e8}{
\index{Cloth@{Cloth}!m\_\-springList@{m\_\-springList}}
\index{m\_\-springList@{m\_\-springList}!Cloth@{Cloth}}
\subsubsection[{m\_\-springList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Spring}$\ast$$>$$\ast$ {\bf Cloth::m\_\-springList}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_af449ac46fd5165eeeca9ac833f3c92e8}


the springs connecting the masses 



Definition at line 307 of file Cloth.h.

\hypertarget{class_cloth_a5ed69fb018e414f71f936ffc601ba185}{
\index{Cloth@{Cloth}!m\_\-stiffness@{m\_\-stiffness}}
\index{m\_\-stiffness@{m\_\-stiffness}!Cloth@{Cloth}}
\subsubsection[{m\_\-stiffness}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-stiffness}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a5ed69fb018e414f71f936ffc601ba185}


the stiffness of the cloth 



Definition at line 352 of file Cloth.h.

\hypertarget{class_cloth_a5f1213368180a05a2d0b8cf7d4888c9c}{
\index{Cloth@{Cloth}!m\_\-structuralHorizontalRestLength@{m\_\-structuralHorizontalRestLength}}
\index{m\_\-structuralHorizontalRestLength@{m\_\-structuralHorizontalRestLength}!Cloth@{Cloth}}
\subsubsection[{m\_\-structuralHorizontalRestLength}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-structuralHorizontalRestLength}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a5f1213368180a05a2d0b8cf7d4888c9c}


the structural horizontal rest length 



Definition at line 400 of file Cloth.h.

\hypertarget{class_cloth_a153e9ce0701eba72013c1b32f63c207e}{
\index{Cloth@{Cloth}!m\_\-structuralVerticalRestLength@{m\_\-structuralVerticalRestLength}}
\index{m\_\-structuralVerticalRestLength@{m\_\-structuralVerticalRestLength}!Cloth@{Cloth}}
\subsubsection[{m\_\-structuralVerticalRestLength}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-structuralVerticalRestLength}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a153e9ce0701eba72013c1b32f63c207e}


the structural vertical rest length 



Definition at line 403 of file Cloth.h.

\hypertarget{class_cloth_ac50992dd4b3623d32105f2db08ac0653}{
\index{Cloth@{Cloth}!m\_\-textureCoords@{m\_\-textureCoords}}
\index{m\_\-textureCoords@{m\_\-textureCoords}!Cloth@{Cloth}}
\subsubsection[{m\_\-textureCoords}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$GLfloat$>$ {\bf Cloth::m\_\-textureCoords}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_ac50992dd4b3623d32105f2db08ac0653}


the texture coordinates of quads used in shaded mode drawing 



Definition at line 316 of file Cloth.h.

\hypertarget{class_cloth_af1ec513edf4ac7da95730029fb66c01b}{
\index{Cloth@{Cloth}!m\_\-textureCount@{m\_\-textureCount}}
\index{m\_\-textureCount@{m\_\-textureCount}!Cloth@{Cloth}}
\subsubsection[{m\_\-textureCount}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-textureCount}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_af1ec513edf4ac7da95730029fb66c01b}


the number of textures loaded 



Definition at line 415 of file Cloth.h.

\hypertarget{class_cloth_a68232ee25e97b627d0cdfc4c9c182e1b}{
\index{Cloth@{Cloth}!m\_\-textureHandler@{m\_\-textureHandler}}
\index{m\_\-textureHandler@{m\_\-textureHandler}!Cloth@{Cloth}}
\subsubsection[{m\_\-textureHandler}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$GLuint$>$ {\bf Cloth::m\_\-textureHandler}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a68232ee25e97b627d0cdfc4c9c182e1b}


the texture handlers 



Definition at line 424 of file Cloth.h.

\hypertarget{class_cloth_a1d54155c182a781ce2597c4b1dd18dfb}{
\index{Cloth@{Cloth}!m\_\-textureHeight@{m\_\-textureHeight}}
\index{m\_\-textureHeight@{m\_\-textureHeight}!Cloth@{Cloth}}
\subsubsection[{m\_\-textureHeight}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-textureHeight}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a1d54155c182a781ce2597c4b1dd18dfb}


the texture height 



Definition at line 421 of file Cloth.h.

\hypertarget{class_cloth_a9ca17695de5153de7abd8f28d71573ba}{
\index{Cloth@{Cloth}!m\_\-textureWidth@{m\_\-textureWidth}}
\index{m\_\-textureWidth@{m\_\-textureWidth}!Cloth@{Cloth}}
\subsubsection[{m\_\-textureWidth}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-textureWidth}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a9ca17695de5153de7abd8f28d71573ba}


the texture width 



Definition at line 418 of file Cloth.h.

\hypertarget{class_cloth_af6c5609126be8dc3955cca34d5f6ba68}{
\index{Cloth@{Cloth}!m\_\-timestep@{m\_\-timestep}}
\index{m\_\-timestep@{m\_\-timestep}!Cloth@{Cloth}}
\subsubsection[{m\_\-timestep}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-timestep}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_af6c5609126be8dc3955cca34d5f6ba68}


the timestep of the simulation 



Definition at line 349 of file Cloth.h.

\hypertarget{class_cloth_a5ff153c4675f7ecee9332fb6a7cb539c}{
\index{Cloth@{Cloth}!m\_\-verticalParticleCount@{m\_\-verticalParticleCount}}
\index{m\_\-verticalParticleCount@{m\_\-verticalParticleCount}!Cloth@{Cloth}}
\subsubsection[{m\_\-verticalParticleCount}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-verticalParticleCount}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a5ff153c4675f7ecee9332fb6a7cb539c}


the vertical number of particles in the cloth 



Definition at line 331 of file Cloth.h.

\hypertarget{class_cloth_aa83f509239244eed1f5bef0d81387f57}{
\index{Cloth@{Cloth}!m\_\-weightSteps@{m\_\-weightSteps}}
\index{m\_\-weightSteps@{m\_\-weightSteps}!Cloth@{Cloth}}
\subsubsection[{m\_\-weightSteps}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-weightSteps}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_aa83f509239244eed1f5bef0d81387f57}


the number of steps to apply weighted cloth 



Definition at line 382 of file Cloth.h.

\hypertarget{class_cloth_a5f4d2021d57ed2e0878ac5a33ed1dbc6}{
\index{Cloth@{Cloth}!m\_\-width@{m\_\-width}}
\index{m\_\-width@{m\_\-width}!Cloth@{Cloth}}
\subsubsection[{m\_\-width}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Cloth::m\_\-width}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a5f4d2021d57ed2e0878ac5a33ed1dbc6}


the width of cloth 



Definition at line 328 of file Cloth.h.

\hypertarget{class_cloth_a07c296175e790cc2745397a20050a22a}{
\index{Cloth@{Cloth}!m\_\-windDirection@{m\_\-windDirection}}
\index{m\_\-windDirection@{m\_\-windDirection}!Cloth@{Cloth}}
\subsubsection[{m\_\-windDirection}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Cloth::m\_\-windDirection}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a07c296175e790cc2745397a20050a22a}


the wind direction 



Definition at line 367 of file Cloth.h.

\hypertarget{class_cloth_af4954e5f36b3c305146c683858faad16}{
\index{Cloth@{Cloth}!m\_\-windEnabled@{m\_\-windEnabled}}
\index{m\_\-windEnabled@{m\_\-windEnabled}!Cloth@{Cloth}}
\subsubsection[{m\_\-windEnabled}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Cloth::m\_\-windEnabled}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_af4954e5f36b3c305146c683858faad16}


the toggle for wind 



Definition at line 361 of file Cloth.h.

\hypertarget{class_cloth_a6c579587fc6dcac3fa2f05de004209e9}{
\index{Cloth@{Cloth}!m\_\-windStrength@{m\_\-windStrength}}
\index{m\_\-windStrength@{m\_\-windStrength}!Cloth@{Cloth}}
\subsubsection[{m\_\-windStrength}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-windStrength}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a6c579587fc6dcac3fa2f05de004209e9}


the wind strength 



Definition at line 364 of file Cloth.h.

\hypertarget{class_cloth_a3987b2432a7ab759620ed1b819108ce1}{
\index{Cloth@{Cloth}!m\_\-xStep@{m\_\-xStep}}
\index{m\_\-xStep@{m\_\-xStep}!Cloth@{Cloth}}
\subsubsection[{m\_\-xStep}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-xStep}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_a3987b2432a7ab759620ed1b819108ce1}


the step value in the column horizontal direction 



Definition at line 337 of file Cloth.h.

\hypertarget{class_cloth_aec3675b89e39e40e5fedf4f5d107c1ca}{
\index{Cloth@{Cloth}!m\_\-zStep@{m\_\-zStep}}
\index{m\_\-zStep@{m\_\-zStep}!Cloth@{Cloth}}
\subsubsection[{m\_\-zStep}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Cloth::m\_\-zStep}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_cloth_aec3675b89e39e40e5fedf4f5d107c1ca}


the step value in the row vertical direction 



Definition at line 340 of file Cloth.h.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
include/\hyperlink{_cloth_8h}{Cloth.h}\item 
src/\hyperlink{_cloth_8cpp}{Cloth.cpp}\end{DoxyCompactItemize}
